Skip to content

Instantly share code, notes, and snippets.

@aligkts
Last active May 8, 2020 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aligkts/a18df3ba7ea84a5e600b800c4ef163f3 to your computer and use it in GitHub Desktop.
Save aligkts/a18df3ba7ea84a5e600b800c4ef163f3 to your computer and use it in GitHub Desktop.
private fun initRecyclerview() {
headerAdapter = HeaderAdapter(MergeAdapterDataSource.getHeader())
titleAdapter = TitleAdapter(MergeAdapterDataSource.getTitle())
imageAdapter = ImageAdapter(MergeAdapterDataSource.getImage())
mergeAdapter = MergeAdapter(headerAdapter, titleAdapter, imageAdapter)
recyclerView.apply {
layoutManager = LinearLayoutManager(this@MainActivity)
adapter = mergeAdapter
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment