From d2aac471acef47cac78ec51afb3173c60334aa23 Mon Sep 17 00:00:00 2001 From: Sahil-pixel <57060638+Sahil-pixel@users.noreply.github.com> Date: Wed, 2 Jun 2021 22:16:19 +0530 Subject: [PATCH] Update orientation.py adding mode ='user' --- plyer/platforms/android/orientation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plyer/platforms/android/orientation.py b/plyer/platforms/android/orientation.py index 5f10958f9..4b677c7b4 100644 --- a/plyer/platforms/android/orientation.py +++ b/plyer/platforms/android/orientation.py @@ -31,6 +31,8 @@ def _set_sensor(self, **kwargs): if mode == 'any': activity.setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_SENSOR) + elif:mode =='user': + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER) elif mode == 'landscape': activity.setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)