What does postInvalidate() do?

后端 未结 3 1726
栀梦
栀梦 2020-11-27 04:09

What is the use of the postInvalidate() function in Android? I have been seeing this function in a lot of places. When I Googled, I came out with this much:

3条回答
  •  天命终不由人
    2020-11-27 04:37

    In simple words, invalidate() method can be called from UI Thread and postInvalidate() can be called from non-UI Thread in order to tell android to update our Custom View after some changes are made to it.

提交回复
热议问题