Code example for Context

Methods: getApplicationInfogetResources

0
     * null, the default (viscous) interpolator will be used. "Flywheel" behavior will 
     * be in effect for apps targeting Honeycomb or newer. 
     */ 
    public Scroller(Context context, Interpolator interpolator) {
        this(context, interpolator,
                context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.HONEYCOMB);
    } 
 
    /** 
     * Create a Scroller with the specified interpolator. If the interpolator is 
     * null, the default (viscous) interpolator will be used. Specify whether or 
     * not to support progressive "flywheel" behavior in flinging. 
     */ 
    public Scroller(Context context, Interpolator interpolator, boolean flywheel) {
        mFinished = true;
        mInterpolator = interpolator;
        mPpi = context.getResources().getDisplayMetrics().density * 160.0f;
        mDeceleration = computeDeceleration(ViewConfiguration.getScrollFriction());
        mFlywheel = flywheel;
    } 
 
    /**