Yes, the CompoundButton sounds like what you are looking for. A specific instance of the CompoundButton is the ToggleButton. Here is an example of the ToggleButton... http://developer.android.com/resources/tutorials/views/hello-formstuff.html#ToggleButton
However, if you want to do something custom, I recommend using a "State List" to control the different states of the button. At the end of this section is an example of the XML source for the states... http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList Hope this helps! -Matt www.sep.com/mcterry On Thursday, March 22, 2012 5:00:24 PM UTC-4, TreKing wrote: > > On Wed, Mar 21, 2012 at 7:20 AM, Alisson Wilker > <[email protected]>wrote: > >> The problem is: how can I get the button to stay in state_pressed, >> getting the style from the current theme? > > > Don't use Button. > > See: > http://developer.android.com/reference/android/widget/CompoundButton.html<http://developer.android.com/reference/android/widget/CompoundButton.html> > and > its derivatives. > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > -- 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

