【发布时间】:2015-12-29 11:03:35
【问题描述】:
我是 Android 新手,需要您的帮助!
我喜欢默认的 tabWidget 样式,但我需要在标签标题中使用白色。
这就是我现在所拥有的
我想要白色的“TAB1”和“TAB2”。
我尝试了自己的 tabwidget 风格。这是代码
<!-- styles.xml -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:tabWidgetStyle">@style/LightTabWidget</item>
</style>
<style name="LightTabWidget" parent="@android:style/Widget.TabWidget">
<item name="android:textColor">@color/tabTitle</item>
</style>
如何只更改文本颜色?不改变其余部分?
感谢您的帮助!
更新 我正在使用tabHost。不使用 TabLayout 可以做我需要的事情吗?
【问题讨论】:
标签: android android-tabhost tabwidget android-style-tabhost