Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Created September 24, 2021 09:08
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 Ahmad-Hamwi/ad867b034b151ddab02122cf755a3d30 to your computer and use it in GitHub Desktop.
Save Ahmad-Hamwi/ad867b034b151ddab02122cf755a3d30 to your computer and use it in GitHub Desktop.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
initViews()
initTabLayout()
initRecycler()
initMediator() // NEW
}
private fun initMediator() {
TabbedListMediator(
recyclerView,
tabLayout,
categories.indices.toList()
).attach()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment