From 3383ac39cc5da6feeedcf2dd371579a24f6704d8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 19 Oct 2022 23:14:57 +0200 Subject: [PATCH] Fix orientation lock not being obeyed on Android --- sbapp/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sbapp/main.py b/sbapp/main.py index d997482..14d7ce1 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -343,6 +343,10 @@ class SidebandApp(MDApp): self.announces_view = None + ActivityInfo = autoclass('android.content.pm.ActivityInfo') + activity = autoclass('org.kivy.android.PythonActivity').mActivity + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) + screen = Builder.load_string(root_layout) return screen