FileDocCategorySizeDatePackage
AccelerateInterpolator.javaAPI DocAndroid 1.5 API1983Wed May 06 22:41:56 BST 2009android.view.animation

AccelerateInterpolator

public class AccelerateInterpolator extends Object implements Interpolator
An interpolator where the rate of change starts out slowly and and then accelerates.

Fields Summary
private float
mFactor
Constructors Summary
public AccelerateInterpolator()

    
public AccelerateInterpolator(float factor)
Constructor

param
factor Degree to which the animation should be eased. Seting factor to 1.0f produces a y=x^2 parabola. Increasing factor above 1.0f exaggerates the ease-in effect (i.e., it starts even slower and ends evens faster)

        mFactor = factor;
    
public AccelerateInterpolator(android.content.Context context, android.util.AttributeSet attrs)

        TypedArray a =
            context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.AccelerateInterpolator);
        
        mFactor = a.getFloat(com.android.internal.R.styleable.AccelerateInterpolator_factor, 1.0f);
        
        a.recycle();
    
Methods Summary
public floatgetInterpolation(float input)

        if (mFactor == 1.0f) {
            return (float)(input * input);
        } else {
            return (float)Math.pow(input, 2 * mFactor);
        }