Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 411
Andrea Baccega Avatar asked Sep 07 '10 14:09

Andrea Baccega


1 Answers

Selectors work only for drawables, not styles.

Reference

like image 142
Carl Manaster Avatar answered Sep 22 '22 11:09

Carl Manaster