Esempio n. 1
0
 @Override
 public void onClick(View v) {
   switch (v.getId()) {
     case R.id.titlebarRightImg:
       {
         if (FLog.isDebug()) {
           FLog.d("Lyrics", "onClick()..");
         }
         if (lyricsDrawerFragment.isDrawerOpen()) {
           lyricsDrawerFragment.closeDrawer();
         } else {
           PlayMode playMode = lyricsContentFragment.getPlayMode();
           int mode = playMode.getMode();
           long count = playMode.getRestSentenceCount();
           if (count > AppConstant.Player.LOOP_5) {
             count = Long.MAX_VALUE;
           } else {
             count = AppConstant.Player.LOOP_5;
           }
           if (FLog.isDebug()) {
             FLog.d("LyricsActivity", "onClick() openDrawer mode=" + mode + " count=" + count);
           }
           lyricsDrawerFragment.openDrawer(playMode.getMode(), count);
         }
       }
       break;
   }
 }
Esempio n. 2
0
 public boolean doOnBackPressed() {
   if (lyricsDrawerFragment.isDrawerOpen()) {
     lyricsDrawerFragment.closeDrawer();
     return true;
   } else if (lyricsContentFragment.doOnBackPressed()) {
     return true;
   } else {
     return super.doOnBackPressed();
   }
 }