How should I select a tab in TabLayout programmatically?
TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); tabLayout.setupWithViewPager(viewPager
You can set TabLayout position using following functions
public void setTab(){ tabLayout.setScrollPosition(YOUR_SCROLL_INDEX,0,true); tabLayout.setSelected(true); }