首页 > 代码库 > invalidate() and postInvalidate()

invalidate() and postInvalidate()

/**
* Invalidate the whole view. If the view is visible,
* {@link #onDraw(android.graphics.Canvas)} will be called at some point in
* the future. This must be called from a UI thread. To call from a non-UI thread,
* call {@link #postInvalidate()}.
*/

 

invalidate():This must be called from a UI thread

postInvalidate():This must be called from a non-UI thread