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,18 +72,18 @@ class PhotoFragment : ViewPagerFragment() {
} }
} }
view.photo_view.setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener { view.photo_view.apply {
override fun onPhotoTap(view: View?, x: Float, y: Float) {
photoClicked()
}
override fun onOutsidePhotoTap() {
photoClicked()
}
})
PhotoViewAttacher(view.photo_view).apply {
maximumScale = 8f maximumScale = 8f
mediumScale = 3f mediumScale = 3f
setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener {
override fun onPhotoTap(view: View?, x: Float, y: Float) {
photoClicked()
}
override fun onOutsidePhotoTap() {
photoClicked()
}
})
} }
loadImage() loadImage()