i am making an application with 4 buttons in it.I want to get them the focus whenever the mouse or some pointer moves over them.But i am not able to do that.Please tell me what is the problem. The coding of buttons is as follows.
m_NextButton.requestFocus();
m_PrevButton.requestFocus();
m_SubmitButton.requestFocus();
m_SkipButton.requestFocus();
The xml coding is as follows:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/button_blue"/>
<item android:state_focused="true" android:drawable="@drawable/button_blue" />
<item android:drawable="@drawable/button_lightgreen" />
</selector>
Thanks in advance.