Andrea Baccega
Andrea Baccega

Reputation: 27633

Create a selector of styles

I would like to create an xml selector of styles.

Basically i would do something like that:

<selector xmlns:android="http://schemas.android.com/apk/res/android">  
  <item android:state_pressed="true"
      style="@style/filter_btn"/>
  <item android:state_pressed="false"
      style="@style/transparent" />
</selector>

Could someone help me ?

Upvotes: 13

Views: 8570

Answers (1)

Carl Manaster
Carl Manaster

Reputation: 40356

Selectors work only for drawables, not styles.

Reference

Upvotes: 10

Related Questions