i want to change the linear layout background of the selected item in list view. I have used selector for this. But it is changing background only once & then again goto the default state.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="schemas.android.com/apk/res/android">;
<item android:state_pressed="true" android:drawable="@drawable/box_2" />
<item android:state_focused="true" android:drawable="@drawable/box_2" />
<!-- focused -->
<item android:state_hovered="true" android:drawable="@drawable/box_2" />
<!-- hovered -->
<item android:state_selected="true" android:drawable="@drawable/box_2" />
<!-- selected -->
<item android:drawable="@drawable/box" />
<!-- default -->
</selector>