1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Development' started by MarKco, Jan 5, 2014.

  1. MarKco

    MarKco Lurker
    Thread Starter

    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:
    1.     <style name="AppBaseTheme" parent="Theme.AppCompat.Light">
    2.         <item name="actionBarTabTextStyle">@style/TabTextStyle</item>
    3.     </style>
    4.  
    and them
    HTML:
    1.     <style name="TabTextStyle" parent="@style/Widget.AppCompat.ActionBar.TabText">
    2.         <item name="android:width">10dp</item>
    3.         <item name="android:padding">0dip</item>
    4.         <item name="android:textSize">5px</item>
    5.     </style>
    6.  
    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
     


Loading...
Similar Threads - AppCompat Tab Bar
  1. Villordsutch
    Replies:
    2
    Views:
    311
  2. pointlesszebra
    Replies:
    3
    Views:
    312
  3. Ripp
    Replies:
    13
    Views:
    424
  4. Smitherten
    Replies:
    3
    Views:
    250
  5. boardtc
    Replies:
    0
    Views:
    383
  6. muylaertlars1
    Replies:
    1
    Views:
    123
  7. dksksks
    Replies:
    1
    Views:
    176
  8. Samsung
    Replies:
    0
    Views:
    241
  9. garhof
    Replies:
    0
    Views:
    429
  10. Edy Setyo Bayu Aji
    Replies:
    2
    Views:
    1,253

Share This Page

Loading...