首页 > 代码库 > Drawable.Callback

Drawable.Callback

 一。介绍

public abstract void invalidateDrawable (Drawable who)

  • Called when the drawable needs to be redrawn. A view at this point should invalidate itself (or at least the part

of itself where the drawable appears).

 

public abstract void scheduleDrawable (Drawable who, Runnable what, long when)

  • A Drawable can call this to schedule the next frame of its animation. An implementation can generally simply call

postAtTime(Runnable, Object, long) with the parameters (what, who, when) to perform the scheduling.

 


public abstract void unscheduleDrawable (Drawable who, Runnable what)

  • A Drawable can call this to unschedule an action previously scheduled with scheduleDrawable(Drawable, Runnable, long).

An implementation can generally simply call removeCallbacks(Runnable, Object) with the parameters (what, who) to unschedule the drawable.

 

二。示例

glslidingBar