From 83a41ca6ce2db9a569e29edeebee0a96044fbd42 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 27 May 2020 23:16:25 +0100 Subject: [PATCH] auto-rotate video to sensor landscape orientation --- app/src/main/java/io/lbry/browser/MainActivity.java | 4 +++- .../java/io/lbry/browser/ui/findcontent/FileViewFragment.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/lbry/browser/MainActivity.java b/app/src/main/java/io/lbry/browser/MainActivity.java index 95bf8181..71b05652 100644 --- a/app/src/main/java/io/lbry/browser/MainActivity.java +++ b/app/src/main/java/io/lbry/browser/MainActivity.java @@ -395,7 +395,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener return ViewCompat.onApplyWindowInsets(v, insets.replaceSystemWindowInsets( - insets.getSystemWindowInsetLeft(), + 0, 0, 0, insets.getSystemWindowInsetBottom())); @@ -1388,6 +1388,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener } findViewById(R.id.global_sdk_initializing_status).setVisibility(View.GONE); findViewById(R.id.app_bar_main_container).setFitsSystemWindows(false); + lockDrawer(); View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility( @@ -1424,6 +1425,7 @@ public class MainActivity extends AppCompatActivity implements SdkStatusListener if (actionBar != null) { actionBar.show(); } + unlockDrawer(); inFullscreenMode = false; } diff --git a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java index 6931e898..fc32c947 100644 --- a/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java +++ b/app/src/main/java/io/lbry/browser/ui/findcontent/FileViewFragment.java @@ -1915,7 +1915,7 @@ public class FileViewFragment extends BaseFragment implements int statusBarHeight = activity.getStatusBarHeight(); exoplayerContainer.setPadding(0, 0, 0, statusBarHeight); - activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); } }