How can I keep a button as pressed after clicking on it? [duplicate]
I had this issue with a button with a custom background, and ended up using the selected state for this. That state is available for all views. To use this you have to define a custom button background as a state list: <selector xmlns:android=”http://schemas.android.com/apk/res/android”> <item android:state_selected=”false” android:state_focused=”false” android:state_pressed=”false”><bitmap … /></item> <item android:state_selected=”true”><bitmap … /></item> <item … Read more