【发布时间】:2014-02-02 07:44:10
【问题描述】:
基本上,我想更改操作栏中选项卡的高度。这个问题在stackoverflow上已经被问过好几次了,例如:
我已经尝试了大多数解决方案,但没有任何效果,这是我的代码。
<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>
显然,代码只改变了操作栏的高度,而不是我想要的标签栏高度。这是图片供参考:
如您所见,底部的操作栏较高。但在操作栏模式下,标签高度保持不变。
为什么会这样?我错过了什么??? 提前谢谢你:)。
已解决,如中所述:
ActionBar with navigation tabs changes height with screen orientation
和
https://code.google.com/p/android/issues/detail?id=41792
显然这是一个来自 android sdk 的错误......虽然我从来没有遇到过这样的错误 :(。希望这对其他人有所帮助。
【问题讨论】:
标签: android android-layout android-fragments android-tabs android-styles