Skip to content

Instantly share code, notes, and snippets.

@cengiztoru
Created July 8, 2021 17:05
Show Gist options
  • Save cengiztoru/1349f4a2e3eae3c779da75667b7dcb14 to your computer and use it in GitHub Desktop.
Save cengiztoru/1349f4a2e3eae3c779da75667b7dcb14 to your computer and use it in GitHub Desktop.
TabLayout with ViewPager2
TabLayoutMediator(mTabLayout, mViewPager) { tab, position ->
tab.text = it[position].title
}.attach()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment