Constructorparamfactor 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;
mFactor = factor;
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();
if (mFactor == 1.0f) { return (float)(input * input); } else { return (float)Math.pow(input, 2 * mFactor); }