OnPreDrawListener
Gets a call immediately before the onDraw () method is called. At this point, all views in the tree were measured and set by a frame. Therefore, you can correctly manipulate the representation in this callback
OnGlobalLayoutListener
This listener is called: - when the visibility state changes. In the example, when the image was drawn, it becomes visible, and this is caused. - when you add the state of the tree of view changes
source share