How should I select a tab in TabLayout programmatically?
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); tabLayout.setupWithViewPager(viewPager
Just set viewPager.setCurrentItem(index) and the associated TabLayout would select the respective tab.
viewPager.setCurrentItem(index)