> I would guess there is an android:state_selected="true" you could use to > specify the drawable for the selected state.
i cloned the default list selector from the android repo (i also copied all the necessary png in my project since i otherwise i get an error that they are not public resources). i then removed any setBackground and so on <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_window_focused="false" android:drawable="@color/ listafilmbg" /> <item android:state_focused="true" android:state_enabled="false" android:state_pressed="true" android:drawable="@drawable/ list_selector_background_disabled" /> <item android:state_focused="true" android:state_enabled="false" android:drawable="@drawable/list_selector_background_disabled" /> <item android:state_focused="true" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="false" android:state_pressed="true" android:drawable="@drawable/list_selector_background_transition" /> <item android:state_focused="true" android:drawable="@drawable/list_selector_background_focus"/> </selector> i tought that the first item line would do the trick but it seems it is never considered what it's in there i even tried to put there "@drawable/ list_selector_background_focus" (the orange box) but no way. The result is a very dark background for items not selected and the orange box for the selected one. but even if i get this working then i'll have the problem of having the elements listed with alternated color because this selector is for the whole list and i do not see a way to change it's behaviour based on the position of the item. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---