[android-developers] how to make a button stay in state_pressed style

2012-03-22 Thread Alisson Wilker
Hello, everyone. I'd like to get a button to behave as a tab, in which, as it is pressed, it changes the content of the view and stays highlighted, indicating that the content is related to that button. The problem is: how can I get the button to stay in state_pressed, getting the style from

Re: [android-developers] how to make a button stay in state_pressed style

2012-03-22 Thread TreKing
On Wed, Mar 21, 2012 at 7:20 AM, Alisson Wilker alissonwil...@gmail.comwrote: 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 and its

Re: [android-developers] how to make a button stay in state_pressed style

2012-03-22 Thread mcterry
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