diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-12-07 23:10:54 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-12-07 23:10:54 +0100 |
commit | bf0257a405f5ad7dee39c52ddd6f669c3893ed31 (patch) | |
tree | 37451517072e3be00fbfb012ac67ee1f39cdb121 /app/src/main/java/de | |
parent | f534481ed0f38159671081f646f0ab4f40415cbd (diff) | |
download | AntennaPod-bf0257a405f5ad7dee39c52ddd6f669c3893ed31.zip |
Fixed fullscreen issues in video player
Affects issue #563
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java index d625f21da..25bcfd931 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -54,6 +54,7 @@ public class VideoplayerActivity extends MediaplayerActivity { @Override protected void onCreate(Bundle savedInstanceState) { getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN); supportRequestWindowFeature(WindowCompat.FEATURE_ACTION_BAR_OVERLAY); // has to be called before setting layout content super.onCreate(savedInstanceState); getSupportActionBar().setBackgroundDrawable(new ColorDrawable(0x80000000)); @@ -116,6 +117,9 @@ public class VideoplayerActivity extends MediaplayerActivity { videoview.getHolder().addCallback(surfaceHolderCallback); videoview.setOnTouchListener(onVideoviewTouched); + if (Build.VERSION.SDK_INT >= 16) { + videoview.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); + } setupVideoControlsToggler(); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); @@ -333,10 +337,9 @@ public class VideoplayerActivity extends MediaplayerActivity { butPlay.startAnimation(animation); } if (Build.VERSION.SDK_INT >= 14) { - videoview.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE); - getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN - | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION); - + int videoviewFlag = (Build.VERSION.SDK_INT >= 16) ? View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION : 0; + getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN + | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | videoviewFlag); } videoOverlay.setVisibility(View.GONE); butPlay.setVisibility(View.GONE); |