ScaleGestureDetectorCompat

Added in 1.1.0

public final class ScaleGestureDetectorCompat


Helper for accessing features in ScaleGestureDetector.

Summary

Public methods

static boolean
isQuickScaleEnabled(Object scaleGestureDetector)

This method is deprecated.

Use isQuickScaleEnabled that takes ScaleGestureDetector instead of Object.

static boolean
@ReplaceWith(expression = "scaleGestureDetector.isQuickScaleEnabled()")
isQuickScaleEnabled(@NonNull ScaleGestureDetector scaleGestureDetector)

This method is deprecated.

Call isQuickScaleEnabled directly.

static void
setQuickScaleEnabled(Object scaleGestureDetector, boolean enabled)

This method is deprecated.

Use setQuickScaleEnabled that takes ScaleGestureDetector instead of Object.

static void
@ReplaceWith(expression = "scaleGestureDetector.setQuickScaleEnabled(enabled)")
setQuickScaleEnabled(
    @NonNull ScaleGestureDetector scaleGestureDetector,
    boolean enabled
)

This method is deprecated.

Call setQuickScaleEnabled directly.

Public methods

isQuickScaleEnabled

Added in 1.1.0
Deprecated in 1.1.0
public static boolean isQuickScaleEnabled(Object scaleGestureDetector)

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

isQuickScaleEnabled

Added in 1.1.0
Deprecated in 1.15.0
@ReplaceWith(expression = "scaleGestureDetector.isQuickScaleEnabled()")
public static boolean isQuickScaleEnabled(@NonNull ScaleGestureDetector scaleGestureDetector)

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

setQuickScaleEnabled

Added in 1.1.0
Deprecated in 1.1.0
public static void setQuickScaleEnabled(Object scaleGestureDetector, boolean enabled)

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
Object scaleGestureDetector

detector for which to set the scaling mode.

boolean enabled

true to enable quick scaling, false to disable

setQuickScaleEnabled

Added in 1.1.0
Deprecated in 1.15.0
@ReplaceWith(expression = "scaleGestureDetector.setQuickScaleEnabled(enabled)")
public static void setQuickScaleEnabled(
    @NonNull ScaleGestureDetector scaleGestureDetector,
    boolean enabled
)

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
@NonNull ScaleGestureDetector scaleGestureDetector

detector for which to set the scaling mode.

boolean enabled

true to enable quick scaling, false to disable