Beispiel #1
0
 @Override
 public boolean onPrepareOptionsMenu(Menu menu) {
   // TODO Auto-generated method stub
   if (mViewCtrl.getActiveId() == ID_INPUTWRITE) {
     menu.clear();
     menu.add(0, R.string.MAIN_RANDOM, 1, R.string.MAIN_RANDOM);
     menu.add(0, R.string.Main_Help, 2, R.string.Main_Help);
   } else if (mViewCtrl.getActiveId() == ID_INPUTBROWER) {
     menu.clear();
     menu.add(0, R.string.MAIN_OUTPUT, 1, R.string.MAIN_OUTPUT);
     menu.add(0, R.string.MAIN_QUEUE, 2, R.string.MAIN_QUEUE);
     menu.add(0, R.string.MAIN_CLEAR, 3, R.string.MAIN_CLEAR);
     menu.add(0, R.string.Main_Help, 4, R.string.Main_Help);
   }
   return super.onPrepareOptionsMenu(menu);
 }
Beispiel #2
0
 @Override
 public boolean onKeyUp(int keyCode, KeyEvent event) {
   // TODO Auto-generated method stub
   if (keyCode == KeyEvent.KEYCODE_BACK) {
     if (mViewCtrl.getActiveId() == ID_INPUTWRITE) {
     } else {
       finish();
     }
   }
   return true;
 }