mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
adding orientation_transpose recognition too
This commit is contained in:
parent
e1a45f15e4
commit
6df3a43ce5
1 changed files with 2 additions and 6 deletions
|
@ -19,11 +19,7 @@ import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import androidx.exifinterface.media.ExifInterface.ORIENTATION_ROTATE_180
|
import androidx.exifinterface.media.ExifInterface.*
|
||||||
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 com.alexvasilkov.gestures.GestureController
|
import com.alexvasilkov.gestures.GestureController
|
||||||
import com.alexvasilkov.gestures.State
|
import com.alexvasilkov.gestures.State
|
||||||
import com.bumptech.glide.Glide
|
import com.bumptech.glide.Glide
|
||||||
|
@ -342,7 +338,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
private fun degreesForRotation(orientation: Int) = when (orientation) {
|
||||||
ORIENTATION_ROTATE_270 -> 270
|
ORIENTATION_ROTATE_270, ORIENTATION_TRANSPOSE -> 270
|
||||||
ORIENTATION_ROTATE_180 -> 180
|
ORIENTATION_ROTATE_180 -> 180
|
||||||
ORIENTATION_ROTATE_90, ORIENTATION_TRANSVERSE -> 90
|
ORIENTATION_ROTATE_90, ORIENTATION_TRANSVERSE -> 90
|
||||||
else -> 0
|
else -> 0
|
||||||
|
|
Loading…
Reference in a new issue