I have a ListView being created in code like this:
ListView lv = new ListView(this);
lv.setId(GENERALLISTVIEWID);
lv.setBackgroundColor(0x333333);
lv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
lv.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
lv.setDivider(null);
lv.setDividerHeight(0);
lv.setSelector(R.drawable.mainselector);
And in my mainselector:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/orange" android:state_pressed="true"/>
<item android:drawable="@color/white" android:state_selected="true"/>
</selector>
The problem is, when I select the row, the entire listview underneath the cells lights up orange. Why is not just the single row turning orange?