示例#1
0
 @Override
 public void onBackPressed() {
   if (ScreenOrientationUtils.isLandscape(this)) {
     mMediaController.changePortrait(false);
   } else {
     super.onBackPressed();
   }
 }
示例#2
0
 @Override
 public void onConfigurationChanged(Configuration newConfig) {
   super.onConfigurationChanged(newConfig);
   // 切换到横屏
   if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
     mMediaController.changeLand(true);
   } else {
     mMediaController.changePortrait(true);
   }
 }