I have a TextView which is inside a LinearLayout which is in the child position of an ExpandableListView. Without assigning a color state selector to the text view, the following behavior is observed:
Text unselected - text paints as white Text selected - text paints as black If I add a color state selector with a call to text.setTextColor(R.color.textcolorstatelist) then the following behavior is observed: Text unselected - text paints as black Text selected - text paints as black I tried two versions of textcolorstatelist.xml and both produced the results above: Version 1) <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:color="#FFFFFFFF"/> <item android:state_selected="false" android:color="#FFFFFFFF"/> <item android:color="#FFFFFFFF"/> </selector> Version 2) <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:color="#00FFFFFF"/> <item android:state_selected="false" android:color="#00FFFFFF"/> <item android:color="#00FFFFFF"/> </selector> Is it possible that the color state list needs to be applied to the whole LinearLayout rather than just the TextView? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

