remove the photoViewAttacher, handle zoom differently
This commit is contained in:
parent
bc73f0d807
commit
eb2ff336ce
1 changed files with 10 additions and 10 deletions
|
@ -72,18 +72,18 @@ class PhotoFragment : ViewPagerFragment() {
|
|||
}
|
||||
}
|
||||
|
||||
view.photo_view.setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener {
|
||||
override fun onPhotoTap(view: View?, x: Float, y: Float) {
|
||||
photoClicked()
|
||||
}
|
||||
|
||||
override fun onOutsidePhotoTap() {
|
||||
photoClicked()
|
||||
}
|
||||
})
|
||||
PhotoViewAttacher(view.photo_view).apply {
|
||||
view.photo_view.apply {
|
||||
maximumScale = 8f
|
||||
mediumScale = 3f
|
||||
setOnPhotoTapListener(object : PhotoViewAttacher.OnPhotoTapListener {
|
||||
override fun onPhotoTap(view: View?, x: Float, y: Float) {
|
||||
photoClicked()
|
||||
}
|
||||
|
||||
override fun onOutsidePhotoTap() {
|
||||
photoClicked()
|
||||
}
|
||||
})
|
||||
}
|
||||
loadImage()
|
||||
|
||||
|
|
Loading…
Reference in a new issue