An OnItemClickListener for a ListView has the following method:
@Override public void onItemClick(AdapterView<?> parent, View v, int position, long id)
I would like to have an adapter for updating ListView , and I believe that this is done with:
BaseAdapter.notifyDataSetChanged()
How to use parent parameter in onItemClick method for this? So far I have tried:
parent.getAdapter().notifyDataSetChanged();
This causes an error because the returned object has the HeaderViewListAdapter class, which for unknown reasons is not a subclass of BaseAdapter .
source share