I am allowing the user to change the color of the buttons. I want to
maintain the default drawables used for focused and onPressed state
and apply the color only when the button is neither  pressed nor
focused.

I am currently achieving this by checking the state of the view in
onDraw() on the button class and apply the color filter if it is
neither pressed or focused, else I am passing null to color filter.

Is there any easier way of doing this? Is there a way to get the
default StateListDrawable of the button and change only the desired
state drawable. I have too many views in my layout and I am trying to
reduce any work done in onDraw method as it is slows down the
layout.Thanks

-VK


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to