Take the 2-minute tour ×

I have many custom buttons (ToggleButton) in my app and want to apply different styles for each button. I created a selector for all the buttons and I currently change only the drawable for the button, like this:


    android:drawable="@drawable/button_gradient_selected" />

    android:drawable="@drawable/button_gradient" />


When I try to change the style the same way:

   style="@style/button_checked />

It does not work, I have tried to change the drawable in the style instead (and just stated the style in the selector), I've also tried to create a separate selector but nothing seems to work.

Any ideas?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Right now it's not possible to do this.

share|improve this answer

Hi friend i also tried to apply themes and found this..Please check it..It might be useful for you.. Try It

share|improve this answer
Unfortunately I've been there and does exactly what I do above, which is not the problem. The link does not set different styles to the button only different drawables which I already do! –  Joakim Engstrom Feb 21 '11 at 12:36

Your Answer


