I have got a ListView and I want to change the Backgroundcolor of it. It should go like this. 1.Item = grey; 2. Item; white; 3. Item = grey; 4. Item = white etc. So it shoul
You can do this easily by setting the background inside the getView function of your custom adapter.
Try this code:
if(position % 2 == 0) convertView.setBackgroundColor(Color.GREY); else convertView.setBackgroundColor(Color.WHITE);