Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Created September 24, 2021 09:08
Show Gist options
  • 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