Skip to content

Commit

Permalink
Update orientation.py
Browse files Browse the repository at this point in the history
adding mode ='user'
  • Loading branch information
Sahil-pixel authored Jun 2, 2021
1 parent f9e68fa commit d2aac47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plyer/platforms/android/orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d2aac47

Please sign in to comment.