• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps AppCompat Tab Bar, tabs headers large and can't shrink them!

MarKco

Lurker
Hello to everybody,
I'm developing an app which makes use of appcompat. I'm adding some tabs to it by simply using
[HIGH]ActionBar.Tab tab = getSupportActionBar().newTab();[/HIGH]
I expected the tabs to be as large as the text I put in them, but it's not. They are equals in width, which is beautiful but makes them overflow when I have three or more tabs.

I tried to style them by using
HTML:
    <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
        <item name="actionBarTabTextStyle">@style/TabTextStyle</item>
    </style>
and them
HTML:
    <style name="TabTextStyle" parent="@style/Widget.AppCompat.ActionBar.TabText">
        <item name="android:width">10dp</item>
        <item name="android:padding">0dip</item>
        <item name="android:textSize">5px</item>
    </style>

it doesn't change anything, it's just like I didn't write these lines :-/ I put them in values-v11 and values-v14 as well, nothing happened.

I'm testing with a Galaxy Nexus having Android 4.3 on it and on a Galaxy S with 4.3 as well.

Does anybody know what could be wrong here?

Thank you in advance
 
Back
Top Bottom