1

I want my ActionBar and Tabs to look like this.

Please ignore colors

enter image description here

Currently it looks like this

enter image description here

Due to my theme, I have to set the custom ActionBar in java.

actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
actionBar.setCustomView(R.layout.custom_action_bar);

Here is my styles.xml

<resources>

    <!-- You are NOT seeing this theme -->
    <style name="AppTheme" parent="android:Theme.Holo.Light.NoActionBar"></style>

    <!-- You ARE seeing this theme -->
    <style name="ScoreBoardStyles" parent="android:Theme.Holo.Light">
        <item name="android:actionBarStyle">@style/CustomActionBar</item>
        <item name="android:actionBarTabStyle">@style/CustomTabs</item>
        <item name="android:actionBarSize">160dp</item>
    </style>

    <style name="CustomActionBar" parent="@android:style/Widget.Holo.Light.ActionBar">
        <item name="android:height">80dp</item>
    </style>

    <style name="CustomTabs" parent="@android:style/Widget.Holo.ActionBar.TabView">
        <item name="android:background">@drawable/tab_indicator</item>
        <item name="android:height">80dp</item>
    </style>

</resources>
  1. Why is my ActionBar below the TabView?

  2. Why is my TabView not changing height?

I am aware there are other questions similar to this, but none of them are this specific.

Any ideas help!

Thank you.

Michael
  • 9,639
  • 3
  • 64
  • 69
  • I'm pretty sure it has to do with your custom view. To add tabs all you have to do is actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); – ksarmalkar Jul 18 '14 at 20:46
  • @ksarmalkar the tabs load in fine and function fine. The styling just doesn't work at all. – Michael Jul 18 '14 at 20:48

1 Answers1

1

It is a bug and this might help you. Or do a search, there are more options.

Community
  • 1
  • 1
TonT
  • 36
  • 4