如何更改标签'底线'的actionbarsherlock的颜色 [英] How to change the color of tab 'underbar' in actionbarsherlock
本文介绍了如何更改标签'底线'的actionbarsherlock的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,我失去理智多过那么。我找不到/明白如何风格该死的东西。 我设法改变标签本身的背景,但我不能cahnge所选选项卡下栏的颜色。
Ok i'm loosing more sanity then ever. I can't find/understand how to style the damn thing. I managed to change the background of the tab itself but I can't cahnge the color of the bar under the selected tab.
如何从蓝色变为东西。
我styles.xml不幸的是我有它的工作原理很不好理解
My styles.xml unfortunately I have very bad understanding of how it works
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Styled" parent="Theme.Sherlock.Light">
<item name="actionBarTabStyle">@style/Widget.Styled.ActionBarTab</item>
<item name="android:actionBarTabStyle">@style/Widget.Styled.ActionBarTab</item>
<item name="actionBarTabBarStyle">@style/Widget.Styled.ActionBarTabBar</item>
<item name="android:actionBarTabBarStyle">@style/Widget.Styled.ActionBarTabBar</item>
<item name="actionBarTabTextStyle">@style/myText</item>
<item name="android:actionBarTabTextStyle">@style/myText</item>
</style>
<style name="Widget.Styled.ActionBarTab" parent="Widget.Sherlock.Light.ActionBar.TabView">
<!-- <item name="background">@drawable/startbcg</item>
<item name="android:background">@drawable/startbcg</item>
<item name="backgroundSplit">@drawable/bg_striped_split</item>
<item name="android:backgroundSplit">@drawable/bg_striped_split</item>
-->
</style>
<style name="Widget.Styled.ActionBarTabBar" parent="Widget.Sherlock.Light.ActionBar.TabBar">
<item name="background">@drawable/startbcg</item>
<item name="android:background">@drawable/startbcg</item>
<item name="backgroundSplit">@drawable/bg_striped_split</item>
<item name="android:backgroundSplit">@drawable/bg_striped_split</item>
</style>
<style name="myText" parent="Widget.Sherlock.Light.ActionBar.TabText">
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
<item name="android:textColor">@android:color/primary_text_dark</item>
<item name="android:textSize">10sp</item>
</style>
<style name="myTextInv" parent="Widget.Sherlock.Light.ActionBar.TabText.Inverse">
<item name="android:textAppearance">@android:style/TextAppearance.Medium</item>
<item name="android:textColor">@android:color/primary_text_dark</item>
<item name="android:textSize">10sp</item>
</style>
</resources>
奖金的问题:在哪里可以找到什么样的属性(如背景)的某些东西有
Bonus question: where I can find what properties (like background) certain stuff has.
推荐答案
使用 ActionbarStyleGenerator 样式的动作条。这是目前为止最简单和最直观的方式。
Use ActionbarStyleGenerator to style the Actionbar. This is by far the simplest and most intuitive way.
如何:
- 使用的用户界面来选择颜色为不同的项目
- 在下载.ZIP一旦完成点击
- 在ZIP文件中包含了你在你的项目中RES /布局复制的资源文件, RES / drawableXXXX文件夹
- Use the UI to select colors for different items
- Once done click on "DOWNLOAD .ZIP"
- The ZIP file contains resource files that you have to copy in your project res/layout and res/drawableXXXX folders
这篇关于如何更改标签'底线'的actionbarsherlock的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文