@Override
  public boolean onHandleActionBarItemClick(ActionBarItem item, int position) {

    switch (item.getItemId()) {
      case EDIT:

        /* Toast.makeText(getApplicationContext(),
        "Você cliclou o botão Adicionar",
        Toast.LENGTH_SHORT).show();*/

        quickActions.show(item.getItemView());
        break;

        /*      case EDIT:

        Toast.makeText(getApplicationContext(),
            "Você cliclou o botão Editar",
            Toast.LENGTH_SHORT).show();

        quickActionsEdit.show(item.getItemView());
        break; */

      default:
        return super.onHandleActionBarItemClick(item, position);
    }

    return true;
  }
예제 #2
0
 @Override
 public boolean onHandleActionBarItemClick(ActionBarItem item, int position) {
   switch (item.getItemId()) {
     case R.id.action_bar_list:
       Intent intent2 = new Intent(MapsList.this, NetList.class);
       Bundle bundle2 = new Bundle();
       bundle2.putString("session", session);
       intent2.putExtras(bundle2);
       startActivity(intent2);
       finish();
       break;
     case R.id.action_bar_view_home:
       Intent intent = new Intent(MapsList.this, Home.class);
       Bundle bundle = new Bundle();
       bundle.putString("session", session);
       intent.putExtras(bundle);
       startActivity(intent);
       finish();
       break;
     default:
       return super.onHandleActionBarItemClick(item, position);
   }
   return true;
 }