public static interface Drawable.Callback
Drawable. Upon retrieving a drawable, use
Drawable.setCallback(android.graphics.drawable.Drawable.Callback)to supply your implementation of the interface to the drawable; it uses this interface to schedule and execute animation changes.
|Modifier and Type||Method and Description|
Called when the drawable needs to be redrawn.
A Drawable can call this to schedule the next frame of its animation.
A Drawable can call this to unschedule an action previously scheduled with
void invalidateDrawable(Drawable who)
who- The drawable that is requesting the update.
Handler.postAtTime(Runnable, Object, long)with the parameters (what, who, when) to perform the scheduling.
who- The drawable being scheduled.
what- The action to execute.
when- The time (in milliseconds) to run. The timebase is
scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long). An implementation can generally simply call
Handler.removeCallbacks(Runnable, Object)with the parameters (what, who) to unschedule the drawable.
who- The drawable being unscheduled.
what- The action being unscheduled.