pinchToZoom

fun View.pinchToZoom(scaleFactor: Float = 1.0f): ScaleGestureDetector

Declare a variable private var gestureDetector: ScaleGestureDetector? = null

override fun onTouchEvent(event: MotionEvent?): Boolean { gestureDetector?.onTouchEvent(event) return true }

Receiver

View

Return

ScaleGestureDetector

Parameters

scaleFactor

Float