Does anyone know how to programatically set the background of a list item from a String Array? I have two string arrays one is the title for the text view and the other contain
This is what i have done for 2 colors.
i have kept 2 colors string in color.xml and i have used it in the custom adapter of the listview
if (position % 2 == 0) convertView.setBackgroundResource(R.color.color1); else convertView.setBackgroundResource(R.color.color2);