• 修改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>
     
  • 相关阅读:
    【java】定时任务@Scheduled
    20180513 实参 形参 数组
    20180513 实参 形参
    20180513 数组 实参 形参
    <转载>二维数组回形遍历
    20180318 代码错题(8)
    20180318 代码错题(7)
    20180318 代码错题(6)
    20180318 代码错题(5)
    20180318 bit置0
  • 原文地址:https://www.cnblogs.com/androidsuperman/p/4250600.html
Copyright © 2020-2023  润新知