Loading src/com/android/gallery3d/app/MovieActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class MovieActivity extends Activity { Window win = getWindow(); WindowManager.LayoutParams winParams = win.getAttributes(); winParams.buttonBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_OFF; winParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; win.setAttributes(winParams); } Loading src/com/android/gallery3d/app/MoviePlayer.java +24 −1 Original line number Diff line number Diff line Loading @@ -112,16 +112,33 @@ public class MoviePlayer implements mMediaController = new MediaController(movieActivity) { @Override public void show() { super.show(); showSystemUi(true); mActionBar.show(); super.show(); } @Override public void hide() { super.hide(); mActionBar.hide(); showSystemUi(false); } }; mMediaController.show(); // When the user touches the screen or uses some hard key, the framework // will change system ui visibility from invisible to visible. We show // the media control at this point. mVideoView.setOnSystemUiVisibilityChangeListener( new View.OnSystemUiVisibilityChangeListener() { public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) { mMediaController.show(); } } }); mMediaController.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { Loading Loading @@ -162,6 +179,12 @@ public class MoviePlayer implements } } private void showSystemUi(boolean visible) { int flag = visible ? 0 : View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; mVideoView.setSystemUiVisibility(flag); mMediaController.setSystemUiVisibility(flag); } public void onSaveInstanceState(Bundle outState) { outState.putInt(KEY_VIDEO_POSITION, mVideoPosition); outState.putLong(KEY_RESUMEABLE_TIME, mResumeableTime); Loading Loading
src/com/android/gallery3d/app/MovieActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ public class MovieActivity extends Activity { Window win = getWindow(); WindowManager.LayoutParams winParams = win.getAttributes(); winParams.buttonBrightness = WindowManager.LayoutParams.BRIGHTNESS_OVERRIDE_OFF; winParams.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; win.setAttributes(winParams); } Loading
src/com/android/gallery3d/app/MoviePlayer.java +24 −1 Original line number Diff line number Diff line Loading @@ -112,16 +112,33 @@ public class MoviePlayer implements mMediaController = new MediaController(movieActivity) { @Override public void show() { super.show(); showSystemUi(true); mActionBar.show(); super.show(); } @Override public void hide() { super.hide(); mActionBar.hide(); showSystemUi(false); } }; mMediaController.show(); // When the user touches the screen or uses some hard key, the framework // will change system ui visibility from invisible to visible. We show // the media control at this point. mVideoView.setOnSystemUiVisibilityChangeListener( new View.OnSystemUiVisibilityChangeListener() { public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) { mMediaController.show(); } } }); mMediaController.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { Loading Loading @@ -162,6 +179,12 @@ public class MoviePlayer implements } } private void showSystemUi(boolean visible) { int flag = visible ? 0 : View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; mVideoView.setSystemUiVisibility(flag); mMediaController.setSystemUiVisibility(flag); } public void onSaveInstanceState(Bundle outState) { outState.putInt(KEY_VIDEO_POSITION, mVideoPosition); outState.putLong(KEY_RESUMEABLE_TIME, mResumeableTime); Loading