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

CycleInterpolator

public class CycleInterpolator extends Object implements Interpolator
Repeats the animation for a specified number of cycles. The rate of change follows a sinusoidal pattern.

Fields Summary
private float
mCycles
Constructors Summary
public CycleInterpolator(float cycles)

        mCycles = cycles;
    
public CycleInterpolator(android.content.Context context, android.util.AttributeSet attrs)

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

        return (float)(Math.sin(2 * mCycles * Math.PI * input));