I guess what you are looking for is a "stateful drawable". Here is a sample code: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob_plain;f=core/res/res/drawable/btn_check.xml;hb=master
The drawable is an xml file, which says which png file should be used depending on whether the button is pressed or not, selected, ... Probably someone else knows a better tutorial for stateful drawables? Peli www.openintents.org On Apr 2, 11:01 pm, guruk <[email protected]> wrote: > a complete redesign... :) for sure always a nice idea.. just not > practical now. > > #1 what you mean with view#setbackgroundcolor().. than I can just > change to on color... > thats how i already do.. or how do you mean... small example somewhere > would be helpful. > > #2 come one.. i dont like to shoot with canons on birds .. there have > to be something more > simple > > #3 ... thats what i am thinking about... to create a set of > backgrounds that include all options.. > hmmm.. but for that i thought i find a more pro solution #1 sounds > best till now if someone > show me how to add a view on a button. > > still any small example is most welcome.. even if its lets say in the > api demo or any other > source... > > whats about the idea from Dianne.. with the Bitmapdrawable.. i was > reading something they > are also stretchable. > > also... thanks.. just for any support you already gave.... its a good > start :) > > greets > chris > > On Apr 2, 11:22 pm, "Mark Murphy" <[email protected]> wrote: > > > > so any other ideas? > > > Idea #1: use View#setBackgroundColor() > > > Idea #2: switch to Canvas and 2D graphics, or OpenGL, or something with > > greater flexibility, instead of trying to work within the View hierarchy > > > Idea #3: redesign your application to only need a handful of colors, and > > hand-create backgrounds for those, embedded as nine-patch drawables in > > your app > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com > > _The Busy Coder's Guide to Android Development_ Version 2.0 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 -~----------~----~----~----~------~----~------~--~---

