fix #448, update Commons to include Raw support

This commit is contained in:
tibbi 2017-12-06 17:08:57 +01:00
parent bb2659d018
commit 5e9ac3aaaa
3 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,7 @@ ext {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.1.9'
implementation 'com.simplemobiletools:commons:3.1.12'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.8.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
implementation 'com.android.support:multidex:1.0.2'

View File

@ -223,7 +223,7 @@ class PhotoFragment : ViewPagerFragment() {
}
private fun addZoomableView() {
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.isGone()) {
if ((medium.isImage()) && isFragmentVisible && view.subsampling_view.isGone() && !medium.isDng()) {
val exif = android.media.ExifInterface(medium.path)
val orientation = exif.getAttributeInt(android.media.ExifInterface.TAG_ORIENTATION, android.media.ExifInterface.ORIENTATION_NORMAL)

View File

@ -18,6 +18,8 @@ data class Medium(var name: String, var path: String, val video: Boolean, val mo
fun isImage() = !isGif() && !video
fun isDng() = path.isDng()
fun getMimeType() = path.getMimeTypeFromPath()
override fun compareTo(other: Medium): Int {