ogaclejapan / SmartTabLayout

A custom ViewPager title strip which gives continuous feedback to the user when scrolling
Apache License 2.0
7.09k stars 1.34k forks source link

tab title color #238

Open conanlee88 opened 7 years ago

conanlee88 commented 7 years ago

i do not find a way to custom a tab title when it is selected. And i have a bug here:my indicator slide to the middle between two tab items,why?

chuckiefan commented 7 years ago

I have the same problem.

chuckiefan commented 7 years ago

Hi,I had found the solution. You could solve by setting app:stl_defaultTabTextColor. For example: app:stl_defaultTabTextColor="@color/color_tab"

make a file called color_tab in res/color. write like this:

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/text_enabled" android:state_selected="true"/>
    <item android:color="@color/text_disabled" android:state_selected="false"/>
</selector>
HumphreySs commented 5 years ago

Thanks for your help!I have used it for my project.