Merge pull request #624 from dntil/master

Add auto screen rotation support.
This commit is contained in:
seven332 authored and GitHub committed 2019-06-17 10:53:50 +08:00
commit f578c6cb8b
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);