android - how to have a clickable AND checkable textview
问题 I want to have the following: a textview that .)changes its background when clicked .)maintains that background until it is clicked again it all comes down to the "checkable" state, but i couldnt figure out how this exactly works. here is the xml i am using for background: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- pressed --> <item android:drawable="@drawable/menuselected" android:state_pressed="true" /> <!-- checked -->