Create custom adapter class by extending BaseAdapter
.
Once you do this, you will get getView() method, inside that method you can do operations for Views you want for your list item.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(position[i]%2==0)
{
// even position color
}
else
{
// odd position color
}
}