@Override
 public boolean onOptionsItemSelected(MenuItem item) {
   switch (item.getItemId()) {
     case R.id.menu_item_delete_crime:
       CrimeLab.get(getActivity()).deleteCrime(mCrime);
       Intent intent = new Intent(getActivity(), CrimeListActivity.class);
       intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
       startActivity(intent);
       getActivity().finish();
       return true;
     default:
       return super.onOptionsItemSelected(item);
   }
 }
Ejemplo n.º 2
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case R.id.loader_menu_set_user_id:
        {
          showUserHashDialog();
          return true;
        }

      case R.id.loader_menu_refresh_map_list:
        {
          refreshMapList();
          return true;
        }

      default:
        return super.onOptionsItemSelected(item);
    }
  }