如何在android中更改选项卡指示器文本的颜色? [英] how to change the color of the tabs indicator text in android?
本文介绍了如何在android中更改选项卡指示器文本的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改选项卡文本指示器的颜色?我可以使用参考 example 的选择器标记更改图标.但不能到文本颜色.如何?
how to change the color of the text indicator of tab? i can change the icon using selector tag refered the example. but cant to the text color. how?
推荐答案
样式在您的自定义主题更改中
Style it in your custom theme change
<item name="android:tabWidgetStyle">@android:style/Widget.TabWidget</item>
和
<style name="Widget.TabWidget">
<item name="android:textAppearance">@style/TextAppearance.Widget.TabWidget</item>
<item name="android:ellipsize">marquee</item>
<item name="android:singleLine">true</item>
</style>
<style name="TextAppearance.Widget.TabWidget">
<item name="android:textSize">14sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@android:color/tab_indicator_text</item>
</style>
这篇关于如何在android中更改选项卡指示器文本的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文