I\'m referencing a great demo here regarding material design. It has tabs, but when I add too many the tab items get squished (see screenshot). How can I make it scroll hori
SlidingTabLayout and SlidingTabStrip classes is what are you looking for You 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.
You can add this app:tabMode="scrollable"
to your android.support.design.widget.TabLayout
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"
.