From b1019af51b34c8cae3eb50f58acc733d18798d61 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 28 Oct 2017 18:39:26 +0200 Subject: [PATCH] fix #320, make orientation by "Device rotation" less sensitive --- .../simplemobiletools/gallery/activities/ViewPagerActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index a6d91c38b..d8d814da1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -176,8 +176,8 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View mOrientationEventListener = object : OrientationEventListener(this, SensorManager.SENSOR_DELAY_NORMAL) { override fun onOrientationChanged(orientation: Int) { val currOrient = when (orientation) { - in 45..134 -> ORIENT_LANDSCAPE_RIGHT - in 225..314 -> ORIENT_LANDSCAPE_LEFT + in 75..134 -> ORIENT_LANDSCAPE_RIGHT + in 225..289 -> ORIENT_LANDSCAPE_LEFT else -> ORIENT_PORTRAIT }