I cannot seem to figure out how to make one or more listview item background change color.
I am currently trying to get the view through the adapter.
ViewGroup v = (ViewGroup) adapter.getView(i, null, listView);
for(int k = 0; k < v.getChildCount(); k++) {
View child = v.getChildAt(k);
child.setBackgroundColor(0xFFA6D2FF);
}
listView.invalidateViews();
I have tried setting the ViewGroup v that contains the text items (the list view items have sub items so it's 2 text views). I have also tried setting the child backgrounds, which may be working but it appears their bounds are 0's. So it may be working, but the children don't have a size even though you can see the text.