ActionBarSherlock tab height not adjustable on Jelly Bean
Asked Answered
U

1

9

I am creating an application with ActionBarSherlock and using ActionBar tabs. Below is how I am defining tabs:

actionBar.addTab(actionBar.newTab().setText("test").setTabListener(new TabListener<AccountsListFragment>(this, "accounts",AccountsListFragment.class)));

I am trying to change the height of the tabs. From what I understand there is no way to change just the height of the tabs. You also have to change the height of the main action bar(I am pulling my definition of the main action bar from) http://developer.android.com/design/patterns/actionbar.html#considerations-split-action-bars So how you change the height of the action bar is using the below style inside the main theme

        <item name="actionBarSize">100dp</item>
    <item name="android:actionBarSize">100dp</item>

The above code seems to work on all devices to change both the Main action bar and the tabs except jellybean. I tested this on a 4.1.2 galaxy nexus. Also on a 4.2 Nexus 7. It seems to work the same on both. It only changes the main action bar and not the tab height at all.

We also tried a custom view for the tabs which did not help us.

If anyone can point me to where in google it says that they do not allow changing height of tabs anymore(Which I doubt is the case) or give me a style to fix this issue. I would greatly appreciate it. If you even give me an example on a normal action bar and not sherlock that should help me.

Underdeveloped answered 4/2, 2013 at 16:46 Comment(0)
U
0

To me it sounds like a silent bug fix. They make some of these at every new release. I doesn't make sense that changing the height of the actionbar should increase the size of the tabs and it isn't something that has been encouraged by Google, rather it's a hack developers have found nice to use. Your only other option is to make it yourself, but it's quite complex and could prove to be time consuming.

Similar post here: Change Actionbar height on Android JellyBean

Underbody answered 5/7, 2013 at 5:46 Comment(1)
Yeah thats what I thought too. Sounds like you shouldnt change it.Underdeveloped

© 2022 - 2024 — McMap. All rights reserved.