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

Seleted Title color; #51

Closed risekid closed 9 years ago

risekid commented 9 years ago

hi, this is a great lib, but I found there is no seleted title color in attributes?

ogaclejapan commented 9 years ago

HI, @risekid

You can use the ColorStateList. https://github.com/ogaclejapan/SmartTabLayout/blob/master/demo/src/main/res/color/custom_tab.xml

Solved?

risekid commented 9 years ago

@ogaclejapan yeah, I know, and it works, thx. But I just wonder why there is just a defaultTabTextColor in attributes.

ogaclejapan commented 9 years ago

@risekid Thank you for your advice.

TabLayout of design support library are also divided into two attributes.


<attr name="tabTextColor" format="color"/>
<attr name="tabSelectedTextColor" format="color"/>

Hmm,, I think as good, even ColorStateList, but, wonder if easy to use better everyone tabTextColor and tabSelectedTextColor...? :o


<attr name="stl_defaultTabTextColor" format="color|reference"/>

I'll consider it. Thanks!