Code example for AnimationDrawable

Methods: start

0
            mAnim.stop();
        } 
        if (drawable instanceof AnimationDrawable) {
            mAnim = (AnimationDrawable)drawable;
            if (mAttached) {
                mAnim.start();
            } 
        } else { 
            mAnim = null;
        } 
    } 
 
    @Override 
    public void setImageDrawable(Drawable drawable) {
        super.setImageDrawable(drawable);
        updateAnim(); 
    } 
 
    @Override 
    @android.view.RemotableViewMethod 
    public void setImageResource(int resid) {