예제 #1
0
 def _set_landscape(self, **kwargs):
     reverse = kwargs.get('reverse')
     if reverse:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)
     else:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
예제 #2
0
 def _set_portrait(self, **kwargs):
     reverse = kwargs.get('reverse')
     if reverse:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT)
     else:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
예제 #3
0
 def _set_landscape(self, **kwargs):
     reverse = kwargs.get('reverse')
     if reverse:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE)
     else:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
예제 #4
0
 def _set_portrait(self, **kwargs):
     reverse = kwargs.get('reverse')
     if reverse:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT)
     else:
         activity.setRequestedOrientation(
             ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
예제 #5
0
    def _set_sensor(self, **kwargs):
        mode = kwargs.get('mode')

        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)
        elif mode == 'portrait':
            activity.setRequestedOrientation(
                ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT)
예제 #6
0
    def _set_sensor(self, **kwargs):
        mode = kwargs.get('mode')

        if mode == 'any':
            activity.setRequestedOrientation(
                ActivityInfo.SCREEN_ORIENTATION_SENSOR)
        elif mode == 'landscape':
            activity.setRequestedOrientation(
                ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE)
        elif mode == 'portrait':
            activity.setRequestedOrientation(
                ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT)