> I have a question about setting the background color for buttons. > When I am using btn.setBackgroundColor(Color.RED), the entire button > turns into a red rectangle.
Correct. > Is there actually a workaround to achieve this? What is "this"? > Also what can I do to revert back to the default color of the button > (the typical plain greysh background). Rummage through the Android source code, figure out what the name is of the standard Button background Drawable, and set the background back to that Drawable. Or, call getDrawable() before changing the background in the first place, hold onto that value, and use it to reset the Button's background later. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

