PhotoView icon indicating copy to clipboard operation
PhotoView copied to clipboard

Add limit for zoom out

Open edisonpagtakhan opened this issue 5 years ago • 1 comments

edisonpagtakhan avatar Mar 15 '19 04:03 edisonpagtakhan

This solution is buggy, instead, you can just add this code:

photoView.apply {
            maximumScale = MAX_SCALE
            mediumScale = MEDIUM_SCALE
            setOnScaleChangeListener { _, _, _ ->
                if (scale < minimumScale) {
                    minimumScale = scale
                } else if (scale < 1f) {
                    minimumScale = 1f
                }
            }
        }

dzemalibric avatar Apr 08 '21 07:04 dzemalibric