Code example for MenuItem

Methods: getItemId, getMenuInfo

0
  } 
 
  @Override 
  public boolean onContextItemSelected(MenuItem item) {
    AdapterContextMenuInfo info = (AdapterContextMenuInfo) item
        .getMenuInfo();
 
    switch (item.getItemId()) {
      case MENU_DELETE:
        mDbAdapter.deleteFromWhiteList(info.id);
        Controller.getInstance().resetAdBlockWhiteList(); 
        fillData(); 
        return true; 
      default: 
        return super.onContextItemSelected(item);
    } 
  } 
 
  @Override 
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);