Esempio n. 1
0
 @Override
 public boolean dispatchCommand(int command, Object tag) {
   CategoryList f =
       ((CategoryList) getSupportFragmentManager().findFragmentById(R.id.category_list));
   switch (command) {
     case R.id.CREATE_COMMAND:
       createCat(null);
       return true;
     case R.id.GROUPING_COMMAND:
       SelectGroupingDialogFragment.newInstance(R.id.GROUPING_COMMAND_DO, f.mGrouping.ordinal())
           .show(getSupportFragmentManager(), "SELECT_GROUPING");
       return true;
     case R.id.GROUPING_COMMAND_DO:
       f.setGrouping(Account.Grouping.values()[(Integer) tag]);
       return true;
   }
   return super.dispatchCommand(command, tag);
 }