<SELECTOR>&NBSP;
must. Must be a root element. Contains one or more <item> elements.
xmlns:android
string, must. Defines the namespace of the XML, which must be
"Http://schemas.android.com/apk/res/android" .
android:state_pressed
Boolean. "True" indicates the use of a pressed state (for example, a button is pressed); "false" indicates a non-pressed state. android:state_focused
Boolean. "True" indicates that the focus state is used (for example, using a rolling ball/d-pad
Focus button); "False" indicates the use of a non-focused state.
android:state_selected
Boolean. "True" indicates that the selected state is used (for example, tab-Open); "false"
Represents a non-checked state for use.
android:state_checkable
Boolean. "True" indicates that the status can be checked, "false" indicates non-available
Tick status use. (Useful only for components that can toggle tick-not tick.) )
android:state_checked
Boolean. "True" indicates that the check status is used; "false" indicates a non-tick status.
android:state_enabled
Boolean. "True" indicates the usable state is used (can receive touch/click events);
"False" indicates an unavailable state to use.
android:window_focused
Boolean. "True" indicates that the application window has the focus when used (application
in the foreground); "false" means use when there is no focus (for example, the notification bar pulls
Or the dialog box appears).
Note: Remember that the first item in StateList that matches the current state will be used. Therefore, if the first item is not
If there is any state attribute, then it will be used every time, which is why the default value must always be at the end (as in the following
As shown in the example).
Android Selector Item Property Daquan (Button press different effect)