update PhotoView to 2.1.2

This commit is contained in:
tibbi 2017-07-09 19:47:54 +02:00
parent ce41e5b7b9
commit 5c88ce9fa8
3 changed files with 8 additions and 11 deletions

View File

@ -37,7 +37,7 @@ dependencies {
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.github.chrisbanes:PhotoView:1.3.1'
compile 'com.github.chrisbanes:PhotoView:2.1.2'
compile 'it.sephiroth.android.exif:library:1.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

View File

@ -38,7 +38,6 @@ import com.simplemobiletools.gallery.helpers.MEDIUM
import com.simplemobiletools.gallery.models.Medium
import it.sephiroth.android.library.exif2.ExifInterface
import kotlinx.android.synthetic.main.pager_photo_item.view.*
import uk.co.senab.photoview.PhotoViewAttacher
import java.io.File
import java.io.FileOutputStream
import java.io.IOException
@ -93,15 +92,13 @@ class PhotoFragment : ViewPagerFragment() {
view.photo_view.apply {
maximumScale = 8f
mediumScale = 3f
setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener {
override fun onPhotoTap(view: View?, x: Float, y: Float) {
photoClicked()
}
setOnOutsidePhotoTapListener {
photoClicked()
}
override fun onOutsidePhotoTap() {
photoClicked()
}
})
setOnPhotoTapListener { view, x, y ->
photoClicked()
}
}
loadImage()

View File

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<uk.co.senab.photoview.PhotoView
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/photo_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>