mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
lets provide Subsampling our own orientation
This commit is contained in:
parent
2da5af065b
commit
84fee84349
1 changed files with 4 additions and 1 deletions
|
@ -224,12 +224,15 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
|
||||
private fun addZoomableView() {
|
||||
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.isGone()) {
|
||||
val exif = android.media.ExifInterface(medium.path)
|
||||
val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, android.media.ExifInterface.ORIENTATION_NORMAL)
|
||||
|
||||
ViewPagerActivity.wasDecodedByGlide = false
|
||||
view.subsampling_view.apply {
|
||||
maxScale = 10f
|
||||
beVisible()
|
||||
setImage(ImageSource.uri(medium.path))
|
||||
orientation = SubsamplingScaleImageView.ORIENTATION_USE_EXIF
|
||||
this.orientation = degreesForRotation(orientation)
|
||||
setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener {
|
||||
override fun onImageLoaded() {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue