I declare a Android button like this:
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/festival_button_selector"
android:textColor="@color/white"
android:text="@string/STR_FEST_SELOFF"
android:onClick="onBtnFestSelectionClick"
/>
And here is the content of this button's selector background (festival_button_selector):
<item android:state_focused="true"
android:drawable="@drawable/festival_button_focus"
/>
<item android:state_pressed="true"
android:drawable="@drawable/festival_button_press"
/>
<item android:state_focused="false"
android:state_pressed="false"
android:drawable="@drawable/festival_button"
/>
Actually, I want to set this button background is in "focus" state (so button background will be festival_button_focus) as default. If we click other button, this button background will return to "normal" state (with background is festival_button). Can we do it?
P/S: I don't want to change festival_button_selector. It'll be ideal if we have a function like button.setFocusState(true) to make this button on focus state.