android
Inconsistent refresh mechanism under Android View double-buffered drawing
Preface Students who often write custom Views will know that when the View changes, they want to actively refresh the View. There are nothing more than two methods: the main thread calls invalidate(), and the child thread calls postInvalidate(). After calling the above two methods, the system will refresh our View at an appropriate time, that is, call back the onDraw method. With this understanding, we will assume that when we exclude other interfering factors, as long as we don't call the invit