简体   繁体   English

如何在Android API 11+中设置ActionbarSherlock选项卡的样式?

[英]How can I style the ActionbarSherlock Tabs in Android API 11+?

I just wanted to give my actionbarsherlock tabs another color. 我只是想给我的actionbarsherlock标签添加另一种颜色。 Therefore, I found this interesting article: Styling the Actionbarsherlock tabs 因此,我发现了这篇有趣的文章: 设置Actionbarsherlock选项卡的样式

Now, my problem is that for me it only works for API level before 11. What am I doing wrong? 现在,我的问题是对我来说,它适用于11之前的API级别。我在做什么错? I implemented the code from the solution just like that. 我就是这样从解决方案中实现代码的。

One other thing that I did, was increasing my API level (from 7 to 11) because this line from the code in the article 我要做的另一件事是将我的API级别(从7提升到11),因为本文代码中的这一行

<item name="android:actionBarTabBarStyle">@style/Theme.app.tabbar.style</item>

produced this error: 产生此错误:

android:actionBarTabBarStyle requires API level 11 (current min is 7)

Any ideas? 有任何想法吗?

对于仅API 11+,您可以在res中创建一个名为values-v11的文件夹,并在其中创建样​​式文件,然后,如果API的级别为11或更高,则仅应用那些样式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM