Skip to content

Instantly share code, notes, and snippets.

@mr5z
Created December 10, 2015 01:37
Show Gist options
  • Save mr5z/0091988295bd6f5c9bcf to your computer and use it in GitHub Desktop.
Save mr5z/0091988295bd6f5c9bcf to your computer and use it in GitHub Desktop.
@Override
public boolean onMenuItemClick(MenuItem item) {
switch(item.getItemId()) {
case R.id.action_forget_device:
// mDevices is an ArrayList<T>
mDevices.remove(index); // determine the index
return true;
default:
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment