Fix orientation lock not being obeyed on Android

This commit is contained in:
Mark Qvist 2022-10-19 23:14:57 +02:00
parent 7039c0330f
commit 3383ac39cc
1 changed files with 4 additions and 0 deletions

View File

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