astuetz / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
139 stars 44 forks source link

Different color for selected tab icon #266

Open eladbitton opened 8 years ago

eladbitton commented 8 years ago

Hi, I want to change the tab drawable to a different one when it's selected. I have created a selector: <?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">

`<item android:drawable="@drawable/ic_tab_document_blue" android:state_selected="true" />`

`<item android:drawable="@drawable/ic_tab_document_gray" />`

</selector>

This is somehow don't work, the gray drawable never changes to the blue one. I believe that the android:state_selected isn't set properly.

andyjslee commented 8 years ago

I am also trying to do this, and it doesn't work either