Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

ScaleGestureDetectorCompat

class ScaleGestureDetectorCompat
kotlin.Any
   ↳ androidx.core.view.ScaleGestureDetectorCompat

Helper for accessing features in ScaleGestureDetector.

Summary

Public methods

static Boolean
isQuickScaleEnabled(scaleGestureDetector: Any!)

Returns whether the quick scale gesture, in which the user performs a double tap followed by a swipe, should perform scaling.

static Boolean
isQuickScaleEnabled(scaleGestureDetector: ScaleGestureDetector!)

Returns whether the quick scale gesture, in which the user performs a double tap followed by a swipe, should perform scaling.

static Unit
setQuickScaleEnabled(scaleGestureDetector: Any!, enabled: Boolean)

Sets whether the associated ScaleGestureDetector.OnScaleGestureListener should receive onScale callbacks when the user performs a doubleTap followed by a swipe.

static Unit
setQuickScaleEnabled(scaleGestureDetector: ScaleGestureDetector!, enabled: Boolean)

Sets whether the associated ScaleGestureDetector.OnScaleGestureListener should receive onScale callbacks when the user performs a doubleTap followed by a swipe.

Public methods

isQuickScaleEnabled

static fun isQuickScaleEnabled(scaleGestureDetector: Any!): Boolean

Deprecated: Use isQuickScaleEnabled(ScaleGestureDetector) that takes ScaleGestureDetector instead of Object.

Returns whether the quick scale gesture, in which the user performs a double tap followed by a swipe, should perform scaling. See setQuickScaleEnabled(ScaleGestureDetector, boolean).

isQuickScaleEnabled

static fun isQuickScaleEnabled(scaleGestureDetector: ScaleGestureDetector!): Boolean

Returns whether the quick scale gesture, in which the user performs a double tap followed by a swipe, should perform scaling. See setQuickScaleEnabled(ScaleGestureDetector, boolean).

setQuickScaleEnabled

static fun setQuickScaleEnabled(scaleGestureDetector: Any!, enabled: Boolean): Unit

Deprecated: Use setQuickScaleEnabled(ScaleGestureDetector, boolean) that takes ScaleGestureDetector instead of Object.

Sets whether the associated ScaleGestureDetector.OnScaleGestureListener should receive onScale callbacks when the user performs a doubleTap followed by a swipe. Note that this is enabled by default if the app targets API 19 and newer.

Parameters
enabled Any!: true to enable quick scaling, false to disable

setQuickScaleEnabled

static fun setQuickScaleEnabled(scaleGestureDetector: ScaleGestureDetector!, enabled: Boolean): Unit

Sets whether the associated ScaleGestureDetector.OnScaleGestureListener should receive onScale callbacks when the user performs a doubleTap followed by a swipe. Note that this is enabled by default if the app targets API 19 and newer.

Parameters
enabled ScaleGestureDetector!: true to enable quick scaling, false to disable