From bf0f9fbdb164b0b79cb31c1021faa82ffc06214b Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Mon, 20 Jul 2026 17:59:59 -0400 Subject: [PATCH] Remove Switch to Landscape Orientation in Video Player Automatically for tablets (smallest width >= 600dp due to constraints when targeting Android 16. --- .../activities/ViewVideoActivity.java | 3 +- .../res/xml-sw600dp/video_preferences.xml | 105 ++++++++++++++++++ 2 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/xml-sw600dp/video_preferences.xml diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java index 4628ad26..ecfeddbd 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java @@ -371,7 +371,8 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe if (savedInstanceState == null) { - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.VIDEO_PLAYER_AUTOMATIC_LANDSCAPE_ORIENTATION, false)) { + if (!getResources().getBoolean(R.bool.isTablet) + && mSharedPreferences.getBoolean(SharedPreferencesUtils.VIDEO_PLAYER_AUTOMATIC_LANDSCAPE_ORIENTATION, false)) { originalOrientation = resources.getConfiguration().orientation; try { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); diff --git a/app/src/main/res/xml-sw600dp/video_preferences.xml b/app/src/main/res/xml-sw600dp/video_preferences.xml new file mode 100644 index 00000000..0f663344 --- /dev/null +++ b/app/src/main/res/xml-sw600dp/video_preferences.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file