I have setup tabs as UPDATE 29/05/2015 this post. Tabs take full width on my Nexus 4 mobile but on nexus 7 tablet it in center and not cover full screen wid
I had the same problem and I checked the TabLayout style, and i found that its default style is Widget.Design.TabLayout
which has different implementations (normal, landscape and sw600dp).
The one we need is the one for tablets (sw600dp) which has the following implementation:
From this style we will use "tabGravity" (which possible values are "center" or "fill") using the "fill" value.
But we need to go deeper, and then we see that this one extends from Base.Widget.Design.TabLayout
, which implementation is:
So, from this style we will need to override "tabMaxWidth".
In my case I set it to 0dp
, so it has no limit.
And my style looked like this:
And then the tab bar will fill the whole screen from side to side.