Here I am going to demonstrate the How to handle button state using xml in android.
Basically button has three states:
1. Selected
2. Pressed
3. Focused
You can handle this state using xml file as well as by java coding.
For Selected State I am using android attribute android:state_selected value to this attribute is true when button is selected.
For Pressed State I am using android attribute android:state_pressed value to this attribute is true when button is selected.
For Focused State I am using android attribute android:state_focused value to this attribute is true when button is selected.
Basically button has three states:
1. Selected
2. Pressed
3. Focused
You can handle this state using xml file as well as by java coding.
For Selected State I am using android attribute android:state_selected value to this attribute is true when button is selected.
For Pressed State I am using android attribute android:state_pressed value to this attribute is true when button is selected.
For Focused State I am using android attribute android:state_focused value to this attribute is true when button is selected.
0 comments:
Post a Comment