Yes, I just want to change the button background. How can I do it at runtime? Would you please to give me a simple example?
Best regards, Eric On Jan 29, 2:17 am, Kostya Vasilyev <kmans...@gmail.com> wrote: > If you only want tochangethe way aToggleButtonlooks (not behaves), > you can replace the background from XML with your own. > > Note thatToggleButtonuses a layer-list drawable to overlay the toggle > state over the standard button background, to reduce the number of > needed images. > > You can find the resource in "data" directory inside the > platforms\platform-<API version>\data\res folder on your computer. > > -- Kostya > > 28.01.2011 21:08, Roger Podacter пишет: > > > > > I was interested in doing something like this as well. My app has 6 > > toggle buttons in a row on one line, and it doesn't quite fit on > > portrait screen. I wanted to make a custom toggle button, color, > > width, etc. > > > You could also make your own state-list drawable I think It's called. > > Anyway in the source of the s d k I think you can find the toggle > > button and then edit it, not sure though. > > > On Jan 27, 7:08 pm, TreKing<treking...@gmail.com> wrote: > >> On Tue, Jan 25, 2011 at 10:43 PM, Eric Chow<eric...@gmail.com> wrote: > >>> How can Ichangethe background color of aToggleButton? > >> Go to the documentation, find the entry forToggleButton, then start > >> reading. There-in lies the answer. > > >> --------------------------------------------------------------------------- > >> ---------------------- > >> TreKing<http://sites.google.com/site/rezmobileapps/treking> - Chicago > >> transit tracking app for Android-powered devices > > -- > Kostya Vasilyev -- WiFi Manager + pretty widget > --http://kmansoft.wordpress.com -- 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