ok, lets forget about drawable. finaly can someone help with a small source: - create a small image / lets say two small dots with two colors. - set this image as background of a button.
than i am quit happy :) thanks chris On Apr 3, 11:19 am, Peli <peli0...@googlemail.com> wrote: > 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_... > > The drawable is an xml file, which says which png file should be used > depending on whether thebuttonis pressed or not, selected, ... > > Probably someone else knows a better tutorial for stateful drawables? > > Peliwww.openintents.org > > On Apr 2, 11:01 pm, guruk <ilovesi...@gmail.com> 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 abutton. > > > 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" <mmur...@commonsware.com> 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 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 -~----------~----~----~----~------~----~------~--~---