Is it possible to remove view or adapter from MergeAdapter
somehow? I\'d try to extend it and remove the view from pieces
but it\'s private>
Expanding on Mark Murphy's answer, I think this is as simple as adding this method to MergeAdapter:
public void removeAdapter(ListAdapter la) {
pieces.remove(la);
}
remove()
takes an object and will do all of the necessary testing & removal for you, if that object is contained in the pieces list. You could make this return a bool or something for your own purposes, but I had no such need.
Then just call something like:
int view_to_remove = *AN_INT*
adapter.removeAdapter(listAdapter.getAdapter(view_to_remove));
adapter.notifyDataSetChanged();