I sub classed SimpleAdapter
to add some extra functionality to it, like changing background color, custom views and filtering. The background thing is working out g
No need to add filter
and bindView
methods, only make sure for getView
:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = super.getView(position, convertView, parent);
if(position%2!=0) {
v.setBackgroundColor(Color.DKGRAY);
}
else {
v.setBackgroundColor(Color.BLACK);
}
return v;
}