Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
val scaleDetector = ScaleGestureDetector(context, listener)
override fun onTouchEvent(event: MotionEvent) : Boolean {
// Let the ScaleGestureDetector inspect all events
return true
val listener = object : ScaleGestureDetector.SimpleOnScaleGestureListener() {
override fun onScale(detector: ScaleGestureDetector): Boolean {
val scale = cameraControl.getZoomRatio.getValue() * detector.getScaleFactor()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.