thanks, I will try that way On Dec 9, 9:26 am, Mark Murphy <[email protected]> wrote: > The StateListDrawable and nine-patch PNG resources used by a Button > are in your SDK. Copy them into your project and modify to suit. > > > > On Thu, Dec 9, 2010 at 10:24 AM, AUandroid <[email protected]> wrote: > > 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 [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 > Available!
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

