Reputation: 61
I created a gallery of webviews in an android app.I want to remove previously selected view from this gallery.How is it possible?
Upvotes: 1
Views: 879
Reputation: 2278
remove it from array that attached to it's adapter then call
adapter.notifyDataSetChanged();
UPDATE:
Get item position with:
int index = gallery.getSelectedItemPosition();
galleryArray.remove(index);
galleryAdapter.notifyDataSetChanged();
Upvotes: 1