I am trying to add my alternate background code in java to an adapter that is not using getview method. Can any one please guide me how I can override/create the getview method? Here's the code i need to add in getview :
if (position % 2 == 0){
addView.setBackgroundResource(R.drawable.oddcellcolor);
} else {
addView.setBackgroundResource(R.drawable.evencellcolor);
}
Any help appreciated! Thanks! Justin