Exemplo n.º 1
0
 @Override
 public void onPause() {
   super.onPause();
   BigLog.i(tag, Logging.getCurrentMethodName(), logHighlight);
   buttonProcessor.onStopClicked();
   android.os.Process.killProcess(android.os.Process.myPid());
 }
Exemplo n.º 2
0
 // from the onClickListener interface
 public void onClick(View v) {
   if (!currentController.canProcessButtons()) {
     BigLog.i(tag, "Cannot process buttons in this state", logHighlight);
     return;
   }
   switch (v.getId()) {
     case R.id.videoPlay:
     case R.id.videoPlayPort:
       BigLog.i(tag, "Play clicked", logHighlight);
       buttonProcessor.onPlayClicked();
       break;
     case R.id.videoPause:
     case R.id.videoPausePort:
       BigLog.i(tag, "Pause clicked", logHighlight);
       buttonProcessor.onPauseClicked();
       break;
     case R.id.videoStop:
     case R.id.videoStopPort:
       BigLog.i(tag, "Stop clicked", logHighlight);
       buttonProcessor.onStopClicked();
       break;
     case R.id.videoNext:
     case R.id.videoNextPort:
       BigLog.i(tag, "Next clicked", logHighlight);
       buttonProcessor.onNextClicked();
       break;
     case R.id.videoPrev:
     case R.id.videoPrevPort:
       BigLog.i(tag, "Prev clicked", logHighlight);
       buttonProcessor.onPrevClicked();
       break;
     case R.id.sync:
     case R.id.syncPort:
       BigLog.i(tag, "Sync clicked", logHighlight);
       buttonProcessor.onSyncClicked();
       break;
     case R.id.toggle:
     case R.id.togglePort:
       BigLog.i(tag, "Toggle clicked", logHighlight);
       buttonProcessor.onToggleClicked();
       break;
     default:
       BigLog.e(tag, "Unknown button clicked?", logHighlight);
   }
 }
Exemplo n.º 3
0
 // from the onItemClickListener interface
 public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
   if (currentController.canProcessButtons())
     buttonProcessor.onPositionClicked(position, listAdapter.getSelectedPosition());
 }