因此,我尝试设置 Actionbar 选项卡的样式,这是我使用 ActionBarSherlock 库实现的。这是我的代码:
<style name="Theme.AndroidDevelopers" parent="Theme.Sherlock.Light.ForceOverflow">
<item name="actionBarTabStyle">@style/CustomActionBarStyle</item>
<item name="android:actionBarTabStyle">@style/CustomActionBarStyle</item>
<style name="CustomActionBarStyle" parent="Widget.Sherlock.Light.ActionBar.TabBar">
<item name="android:background">@drawable/actionbar_tab_bg</item>
</style>
在第二行和第三行,如果我将 actionBarTabStyle 更改为 actionBarStyle,我的操作栏本身就会更改为我想要的样式(当然不是很好),因此连接确实有效。但是,尝试更改操作栏选项卡(位于其下方)仍然没有成功。
我希望有人能帮助我。
带着敬意,
以下应该有效
<style name="Theme.app" parent="@style/Theme.Sherlock.Light">
<item name="android:actionBarTabBarStyle">@style/Theme.app.tabbar.style</item>
<item name="actionBarTabBarStyle">@style/Widget.app.ActionBar.TabBar</item>
</style>
<style name="Theme.app.tabbar.style" parent="@style/Theme.Sherlock.Light">
<item name="android:background">#FF0000</item>
<item name="background">#FF0000</item>
</style>
<style name="Widget.app.ActionBar.TabBar" parent="Widget.Sherlock.ActionBar.TabBar">
<item name="android:background">#FF0000</item>
<item name="background">#FF0000</item>
</style>
这使得 tabBar 变成红色。
您需要设置两倍的actionBarTabBarStyle。这是因为 Android > 3.0 和 Android
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)