FileDocCategorySizeDatePackage
ScaleGestureDetectorCompat.javaAPI DocAndroid 5.1 API3036Thu Mar 12 22:22:56 GMT 2015android.support.v4.view

ScaleGestureDetectorCompat

public class ScaleGestureDetectorCompat extends Object
Helper for accessing features in ScaleGestureDetector introduced after API level 19 (KitKat) in a backwards compatible fashion.

Fields Summary
static final ScaleGestureDetectorImpl
IMPL
Constructors Summary
private ScaleGestureDetectorCompat()

        final int version = android.os.Build.VERSION.SDK_INT;
        if (version >= 19) { // KitKat
            IMPL = new ScaleGestureDetectorCompatKitKatImpl();
        } else {
            IMPL = new BaseScaleGestureDetectorImpl();
        }
    
Methods Summary
public static booleanisQuickScaleEnabled(java.lang.Object scaleGestureDetector)
Return whether the quick scale gesture, in which the user performs a double tap followed by a swipe, should perform scaling. See setQuickScaleEnabled(Object, boolean).

        return IMPL.isQuickScaleEnabled(scaleGestureDetector); // KitKat
    
public static voidsetQuickScaleEnabled(java.lang.Object scaleGestureDetector, boolean enabled)
Set whether the associated 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.

param
enabled true to enable quick scaling, false to disable

        IMPL.setQuickScaleEnabled(scaleGestureDetector, enabled);