Add auto screen rotation support.

This commit is contained in:
liqichang committed 2019-06-16 10:04:41 +08:00
1 parent 21ef5897ef
commit 2c43589c1c
4 files changed
+10

No files matched your search

@@ -370,6 +370,9 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
case 2:
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
break;
case 3:
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
break;
}
setRequestedOrientation(orientation);
@@ -841,6 +844,9 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
case 2:
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
break;
case 3:
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
break;
}
setRequestedOrientation(orientation);
mGalleryView.setLayoutMode(layoutMode);