Hi! Im trying to change background color when an item is selected. Something like using a color selector, but actually it crashes. I've created a list_selector.xml inside /res/color/...
<?xml version="1.0" encoding="UTF-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_focused="true" android:color="@color/ plain_yellow"/> <item android:state_pressed="true" android:state_enabled="false" android:color="@color/plain_yellow" /> <item android:state_enabled="false" android:color="@color/ plain_yellow" /> <item android:state_active="true" android:color="@color/ plain_yellow" /> <item android:color="@android:color/transparent"/> </selector> plain_yellow is a color i've defined in /res/values. I've tried to assign that selector programatically and using the xml, but the app crashes. Am i doing something wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---