How to enable horizontal scroll in tab like Google Play?
TabLayout
has a method setTabMode()
which can be either MODE_FIXED
(default) or MODE_SCROLLABLE
which is what you need.
You can also define this in XML with app:tabMode="scrollable"
.
You can add this app:tabMode="scrollable"
to your android.support.design.widget.TabLayout
SlidingTabLayout and SlidingTabStrip classes is what are you looking forYou need to copy these classes from google developers site, add sliding tab layout in xml, and in set viewpager for sliding tab layout in java. Hope it'll help.