Skip to content Skip to sidebar Skip to footer

Tab Custom View Not Selected In Tablayout

If have a TabLayout setup with a ViewPager and I use custom views for the tabs. Each custom view is a simple FrameLayout containing an ImageView with the appropriate states (differ

Solution 1:

Use this code on onCreate() after setupWithViewPager() method is called.

mTabLayout.getTabAt(1).select();    
mTabLayout.getTabAt(0).select();

Post a Comment for "Tab Custom View Not Selected In Tablayout"