码迷,mamicode.com
首页 > 其他好文 > 详细

修改TabPageIndicator下划线的颜色

时间:2015-01-26 16:54:25      阅读:2513      评论:0      收藏:0      [点我收藏+]

标签:

   <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下划线的颜色

标签:

原文地址:http://www.cnblogs.com/androidsuperman/p/4250600.html

(2)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!