Design Support TabLayout

Adam picture Adam · Jul 9, 2015 · Viewed 10.6k times · Source

I'm playing around with the Design Support Library TabLayout. My problem is that the title of one of the tabs is too long and so, it is drawn on 2 lines instead of 1. I'm wondering if there's a way scale the title text size to ensure that all titles are drawn on 1 line.

Here's a screenshot to better explain my problem:enter image description here

In case the details are important, I'm using Design Support TabLayout, a ViewPager and a FragmentPagerAdapter to populate my tabs.

Thanks in advance!

Answer

Mark Keen picture Mark Keen · Jul 10, 2015

have you set:

<android.support.design.widget.TabLayout
    ..
    app:tabMode="scrollable" />