Video overlay was hidden in some cases

This commit is contained in:
daniel oeh 2014-12-08 19:01:46 +01:00
parent 75194887e7
commit 43243c1b70
4 changed files with 6 additions and 9 deletions

View File

@ -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);

View File

@ -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">
<RelativeLayout
android:id="@+id/timecontrol"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginBottom="4dp"
android:background="#80000000"
android:paddingTop="8dp">
<TextView
@ -67,7 +66,6 @@
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="4dp"
android:paddingRight="@dimen/navigation_bar_width"
android:text="@string/position_default_label"
android:textColor="@color/white"
android:textStyle="bold" />

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="navigation_bar_width">42dp</dimen>
</resources>

View File

@ -33,6 +33,4 @@
<dimen name="listitem_icon_leftpadding">16dp</dimen>
<dimen name="listitem_icon_rightpadding">16dp</dimen>
<dimen name="navigation_bar_width">0dp</dimen>
</resources>