I want to change the background of a listview item when the user clicks it. Kind of like the Honeycomb settings page (Although I\'m not dealing with just settings so I\'m no
Hope this help,
1.- Create a shape file for focused item: \drawable\list_selector_focused.xml
2.- Create a shape file for pressed item: \drawable\list_selector_pressed.xml
3.- Create list selector file: \drawable\list_selector.xml
4.- Add this attribute to your ListView in the layout file:
android:choiceMode="singleChoice"
android:listSelector="@drawable/list_selector"
You can use colors instead of gradient shapes,