首页 > 代码库 > 修改TabPageIndicator下划线的颜色
修改TabPageIndicator下划线的颜色
<style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator"> <item name="android:background">@drawable/tab_indicator</item> <item name="android:textAppearance">@style/CustomTabPageIndicator.Text</item> <item name="android:textSize">18sp</item> <item name="android:textColor">@drawable/viewpager_title_textcolor</item> <item name="android:dividerPadding">8dp</item> <item name="android:showDividers">middle</item> <item name="android:paddingLeft">10dp</item> <item name="android:paddingRight">10dp</item> <item name="android:fadingEdge">horizontal</item> <item name="android:fadingEdgeLength">8dp</item> </style>
重点修改
viewpager_title_textcolor:
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Non focused states --> <item android:state_focused="false" android:state_pressed="false" android:state_selected="false" android:color="#99000000"/> <item android:state_focused="false" android:state_pressed="false" android:state_selected="true" android:color="#f47240"/> <!-- Focused states --> <item android:state_focused="true" android:state_pressed="false" android:state_selected="false" android:color="#99000000"/> <item android:state_focused="true" android:state_pressed="false" android:state_selected="true" android:color="#f47240"/> <!-- Pressed --> <item android:state_pressed="true" android:color="#f47240"/></selector>
修改TabPageIndicator下划线的颜色
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。