FileDocCategorySizeDatePackage
AnimateDrawable.javaAPI DocAndroid 1.5 API2175Wed May 06 22:41:08 BST 2009com.example.android.apis.graphics

AnimateDrawable

public class AnimateDrawable extends ProxyDrawable

Fields Summary
private android.view.animation.Animation
mAnimation
private android.view.animation.Transformation
mTransformation
Constructors Summary
public AnimateDrawable(android.graphics.drawable.Drawable target)


       
        super(target);
    
public AnimateDrawable(android.graphics.drawable.Drawable target, android.view.animation.Animation animation)

        super(target);
        mAnimation = animation;
    
Methods Summary
public voiddraw(android.graphics.Canvas canvas)

        Drawable dr = getProxy();
        if (dr != null) {
            int sc = canvas.save();
            Animation anim = mAnimation;
            if (anim != null) {
                anim.getTransformation(
                                    AnimationUtils.currentAnimationTimeMillis(),
                                    mTransformation);
                canvas.concat(mTransformation.getMatrix());
            }
            dr.draw(canvas);
            canvas.restoreToCount(sc);
        }
    
public android.view.animation.AnimationgetAnimation()

        return mAnimation;
    
public booleanhasEnded()

        return mAnimation == null || mAnimation.hasEnded();
    
public booleanhasStarted()

        return mAnimation != null && mAnimation.hasStarted();
    
public voidsetAnimation(android.view.animation.Animation anim)

        mAnimation = anim;