Search code examples
androidxmlandroid-actionbarandroid-tabs

Custom ActionBar Height and ActionBar Tab Height


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.


Solution

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