I can't figure out how my ListView
is refreshing itself after deleting an item in onActionItemClicked
.
@Override
public boolean onActionItemClicked(ActionMode actionMode, MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_item_delete_notification:
mNotifications.remove(0);
actionMode.finish();
return true;
…
Obviously I realize the item I am deleting in this code sample is not dynamically chosen, I just put this for example purposes. After deleting an item it will automatically refresh the ListView
without me calling notifyDatasetChanged()
.