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

原文地址:https://www.cnblogs.com/ZacharyHodgeZou/p/3726162.html