From 43243c1b70b6cae7f7ce3105e171afa6f9982144 Mon Sep 17 00:00:00 2001 From: daniel oeh Date: Mon, 8 Dec 2014 19:01:46 +0100 Subject: [PATCH] Video overlay was hidden in some cases --- .../de/danoeh/antennapod/activity/VideoplayerActivity.java | 5 +++++ app/src/main/res/layout/videoplayer_activity.xml | 4 +--- core/src/main/res/values-v11/dimens.xml | 4 ---- core/src/main/res/values/dimens.xml | 2 -- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 core/src/main/res/values-v11/dimens.xml 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 25bcfd931..727b25296 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/VideoplayerActivity.java @@ -120,6 +120,10 @@ public class VideoplayerActivity extends MediaplayerActivity { if (Build.VERSION.SDK_INT >= 16) { videoview.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION); } + if (Build.VERSION.SDK_INT >= 14) { + videoOverlay.setFitsSystemWindows(true); + } + setupVideoControlsToggler(); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); @@ -340,6 +344,7 @@ public class VideoplayerActivity extends MediaplayerActivity { 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.setFitsSystemWindows(true); } videoOverlay.setVisibility(View.GONE); butPlay.setVisibility(View.GONE); diff --git a/app/src/main/res/layout/videoplayer_activity.xml b/app/src/main/res/layout/videoplayer_activity.xml index 4dfab0479..766cd6e04 100644 --- a/app/src/main/res/layout/videoplayer_activity.xml +++ b/app/src/main/res/layout/videoplayer_activity.xml @@ -33,14 +33,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom|center" - android:background="#80000000" android:orientation="vertical"> diff --git a/core/src/main/res/values-v11/dimens.xml b/core/src/main/res/values-v11/dimens.xml deleted file mode 100644 index 62423fc1b..000000000 --- a/core/src/main/res/values-v11/dimens.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 42dp - \ No newline at end of file diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml index 37a17f3df..38c14b024 100644 --- a/core/src/main/res/values/dimens.xml +++ b/core/src/main/res/values/dimens.xml @@ -33,6 +33,4 @@ 16dp 16dp - 0dp - \ No newline at end of file