mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-18 21:10:35 +01:00
fix #320, make orientation by "Device rotation" less sensitive
This commit is contained in:
parent
049d84e054
commit
b1019af51b
@ -176,8 +176,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 45..134 -> ORIENT_LANDSCAPE_RIGHT
|
in 75..134 -> ORIENT_LANDSCAPE_RIGHT
|
||||||
in 225..314 -> ORIENT_LANDSCAPE_LEFT
|
in 225..289 -> ORIENT_LANDSCAPE_LEFT
|
||||||
else -> ORIENT_PORTRAIT
|
else -> ORIENT_PORTRAIT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user