remove the photoViewAttacher, handle zoom differently

This commit is contained in:
tibbi 2017-03-22 23:45:20 +01:00
parent bc73f0d807
commit eb2ff336ce

View file

@ -72,7 +72,10 @@ class PhotoFragment : ViewPagerFragment() {
} }
} }
view.photo_view.setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener { view.photo_view.apply {
maximumScale = 8f
mediumScale = 3f
setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener {
override fun onPhotoTap(view: View?, x: Float, y: Float) { override fun onPhotoTap(view: View?, x: Float, y: Float) {
photoClicked() photoClicked()
} }
@ -81,9 +84,6 @@ class PhotoFragment : ViewPagerFragment() {
photoClicked() photoClicked()
} }
}) })
PhotoViewAttacher(view.photo_view).apply {
maximumScale = 8f
mediumScale = 3f
} }
loadImage() loadImage()