From 6df3a43ce50a3df86bc2b6cb6f477fa0660b00ac Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 20 Sep 2022 08:36:27 +0200 Subject: [PATCH] adding orientation_transpose recognition too --- .../gallery/pro/fragments/PhotoFragment.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt index d2577d856..6417bce64 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt @@ -19,11 +19,7 @@ import android.view.MotionEvent import android.view.View import android.view.ViewGroup import android.widget.RelativeLayout -import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_180 -import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_270 -import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_90 -import androidx.exifinterface.media.ExifInterface.ORIENTATION_TRANSVERSE -import androidx.exifinterface.media.ExifInterface.TAG_ORIENTATION +import androidx.exifinterface.media.ExifInterface.* import com.alexvasilkov.gestures.GestureController import com.alexvasilkov.gestures.State import com.bumptech.glide.Glide @@ -342,7 +338,7 @@ class PhotoFragment : ViewPagerFragment() { } private fun degreesForRotation(orientation: Int) = when (orientation) { - ORIENTATION_ROTATE_270 -> 270 + ORIENTATION_ROTATE_270, ORIENTATION_TRANSPOSE -> 270 ORIENTATION_ROTATE_180 -> 180 ORIENTATION_ROTATE_90, ORIENTATION_TRANSVERSE -> 90 else -> 0