我再次与ActionBar
SDK 14 及更高版本的样式作斗争。我正在尝试删除/减少Tab
图标之间的间距,因为默认间距不适合我的设计。目前我的风格如下:
<style name="sMain" parent="@android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/mTabAreaBackground</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle</item>
</style>
<style name="mTabAreaBackground" parent="@android:style/Widget.Holo.ActionBar.Solid">
<item name="android:backgroundStacked">#2b2f33</item>
</style>
<style name="ActionBarTabStyle" parent="@android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">@android:color/transparent</item>
<!-- below attributes have no effect -->
<item name="android:width">0dp</item>
<item name="android:height">0dp</item>
</style>
由于我的选项卡图标已经有一个,因此我通过使其透明来“删除”活动选项卡指示器。我假设选项卡图标之间的间距与选项卡指示器有某种关系,尽管我将其设置为透明,但它仍然存在。因此,我尝试以相同的样式(继承自style/Widget.Holo.ActionBar.TabView
)应用宽度和高度 0。我不知道我的假设是不正确还是我做错了什么,我也找不到任何与调整 Tab 图标间距相关的文档/示例。
任何建议表示赞赏。