Basically, I want to change the height of the tabs in actionbars. This questions has been asked several times on stackoverflow, for example:
I have tried most of the solutions but nothing work, here is my code.
<style name="CustomActionBarTheme" parent="@android:style/Theme.Holo">
<item name="android:scrollHorizontally">false</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">0dp</item>
<item name="android:actionBarSize">80dp</item>
<item name="actionBarSize">80dp</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle</item>
</style>
<style name="ActionBarTabStyle" parent="@android:style/Widget.Holo.ActionBar.TabView">
<item name="android:height">80dp</item>
</style>
Apparently, the code only change the actionbar height, not the tab bar height as I want. Here is the picture for reference:
As you can see, the actionbar on the bottom is higher. But in actionbar mode, the tabs height remain the same.
Why is this happening? Did i miss something??? Thank you in advance :).
Solved, as mention in:
ActionBar with navigation tabs changes height with screen orientation
and
https://code.google.com/p/android/issues/detail?id=41792
Apparently this is a bug from android sdk ... Never though I would encounter a bug like this :(. Hope this help other people.
By setting both the Application theme attribute android:actionBarSize and the ActionBar.TabView style attribute android:minHeight (or height) to 80 dp. A basic example:
Set theme in Manifest:
Activity
From what I see in the documentation, it seems like it is not possible to change the tab height. But you can use a workaround - try using PagerSlidingTabStrip instead of ActionbarTabs. You can change the height in there easily.