mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
make it easier to keep the device in landscape mode
This commit is contained in:
parent
69bc80fa4e
commit
bdc61380a5
1 changed files with 2 additions and 2 deletions
|
@ -228,8 +228,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) {
|
mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) {
|
||||||
override fun onOrientationChanged(orientation: Int) {
|
override fun onOrientationChanged(orientation: Int) {
|
||||||
val currOrient = when (orientation) {
|
val currOrient = when (orientation) {
|
||||||
in 60..134 -> ORIENT_LANDSCAPE_RIGHT
|
in 75..134 -> ORIENT_LANDSCAPE_RIGHT
|
||||||
in 225..299 -> ORIENT_LANDSCAPE_LEFT
|
in 225..285 -> ORIENT_LANDSCAPE_LEFT
|
||||||
else -> ORIENT_PORTRAIT
|
else -> ORIENT_PORTRAIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue