Skip to content
This repository has been archived by the owner on May 24, 2019. It is now read-only.

Commit

Permalink
adjusted onCreateViewHolder identations
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelcosta committed Nov 16, 2017
1 parent 725333a commit 230903d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class MostPopularShowsAdapter(
private val showsList: List<MostPopularShowsListItemResponseData>
) : RecyclerView.Adapter<MostPopularShowsAdapter.MostPopularShowsViewHolder>() {

override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): MostPopularShowsViewHolder {
val v = LayoutInflater.from(context).inflate(R.layout.item_most_popular_shows, parent, false)
return MostPopularShowsViewHolder(v)
}
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): MostPopularShowsViewHolder =
MostPopularShowsViewHolder(
LayoutInflater.from(context)
.inflate(R.layout.item_most_popular_shows, parent, false)
)

override fun onBindViewHolder(holder: MostPopularShowsViewHolder?, position: Int) {
val item = showsList[position]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ class NowPlayingMoviesAdapter(
private val openDetailFunction: (movieDetailId: Int) -> Unit
) : RecyclerView.Adapter<NowPlayingMoviesAdapter.NowPlayingMovieViewHolder>() {

override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): NowPlayingMovieViewHolder {
val v = LayoutInflater.from(context).inflate(R.layout.item_now_playing_movies, parent, false)
return NowPlayingMovieViewHolder(v)
}
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): NowPlayingMovieViewHolder =
NowPlayingMovieViewHolder(
LayoutInflater.from(context)
.inflate(R.layout.item_now_playing_movies, parent, false)
)

override fun onBindViewHolder(holder: NowPlayingMovieViewHolder?, position: Int) {
val item = moviesList[position]
Expand Down

0 comments on commit 230903d

Please sign in to comment.