I\'m using a SimpleCursorAdapter
and a ListView
to show some data loaded with a Loader.
Inside the cursor
I have items with a in
I think you only need to inflate the right layout on your getView(int position, View convertView, ViewGroup parent)
method:
MyItem item = getItem(position);
View vi = convertView;
if(vi == null){
switch(item.getStatus())
{
case 0:
vi = mInflater.inflate(R.layout.item1, null);
break;
case 1:
vi = mInflater.inflate(R.layout.item2, null);
break;
case 2:
vi = mInflater.inflate(R.layout.item3, null);
break;
}
//set viewholder ...
}else{
//get viewholder ...
}
// set values to views ...
Is this what you needed?