android.graphics.drawable
Class AnimationDrawable

java.lang.Object
  extended by android.graphics.drawable.Drawable
      extended by android.graphics.drawable.DrawableContainer
          extended by android.graphics.drawable.AnimationDrawable
All Implemented Interfaces:
Animatable, Drawable.Callback, Runnable

public class AnimationDrawable
extends DrawableContainer
implements Runnable, Animatable


Nested Class Summary
 
Nested classes/interfaces inherited from class android.graphics.drawable.DrawableContainer
DrawableContainer.DrawableContainerState
 
Nested classes/interfaces inherited from class android.graphics.drawable.Drawable
Drawable.Callback, Drawable.ConstantState
 
Constructor Summary
AnimationDrawable()
           
 
Method Summary
 void addFrame(Drawable frame, int duration)
           
 int getDuration(int i)
           
 Drawable getFrame(int index)
           
 int getNumberOfFrames()
           
 void inflate(Resources r, org.xmlpull.v1.XmlPullParser parser, AttributeSet attrs)
           
 boolean isOneShot()
           
 boolean isRunning()
           
 Drawable mutate()
           
 void run()
           
 void setOneShot(boolean oneShot)
           
 boolean setVisible(boolean visible, boolean restart)
           
 void start()
           
 void stop()
           
 void unscheduleSelf(Runnable what)
           
 
Methods inherited from class android.graphics.drawable.DrawableContainer
draw, getChangingConfigurations, getConstantState, getCurrent, getIntrinsicHeight, getIntrinsicWidth, getMinimumHeight, getMinimumWidth, getOpacity, getPadding, invalidateDrawable, isStateful, jumpToCurrentState, onBoundsChange, onLevelChange, onStateChange, scheduleDrawable, selectDrawable, setAlpha, setColorFilter, setConstantState, setDither, setEnterFadeDuration, setExitFadeDuration, unscheduleDrawable
 
Methods inherited from class android.graphics.drawable.Drawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getLevel, getState, getTransparentRegion, invalidateSelf, isVisible, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLevel, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnimationDrawable

public AnimationDrawable()
Method Detail

setVisible

public boolean setVisible(boolean visible,
                          boolean restart)
Overrides:
setVisible in class DrawableContainer

start

public void start()
Specified by:
start in interface Animatable

stop

public void stop()
Specified by:
stop in interface Animatable

isRunning

public boolean isRunning()
Specified by:
isRunning in interface Animatable

run

public void run()
Specified by:
run in interface Runnable

unscheduleSelf

public void unscheduleSelf(Runnable what)
Overrides:
unscheduleSelf in class Drawable

getNumberOfFrames

public int getNumberOfFrames()

getFrame

public Drawable getFrame(int index)

getDuration

public int getDuration(int i)

isOneShot

public boolean isOneShot()

setOneShot

public void setOneShot(boolean oneShot)

addFrame

public void addFrame(Drawable frame,
                     int duration)

inflate

public void inflate(Resources r,
                    org.xmlpull.v1.XmlPullParser parser,
                    AttributeSet attrs)
             throws org.xmlpull.v1.XmlPullParserException,
                    IOException
Overrides:
inflate in class Drawable
Throws:
org.xmlpull.v1.XmlPullParserException
IOException

mutate

public Drawable mutate()
Overrides:
mutate in class DrawableContainer


Copyright © 2008-2012. All Rights Reserved.