Draw onDraw dispatchDraw

Interesting is the difference between the draw () , onDraw () and dispatchDraw () methods in the View (and ViewGroup too).

PS I found this conversation but it is still not clear to me. It also looks like some of the answers from Romain Guy have disappeared. It is sad.

PPS Good question also: "So, let's say I have RelativeLayout

a button inside that has layoutparam

a margintop

10dip . After measuring and layout, the structure decides that it should be placed 15px below the top of the view (so y = 15

). Now click, I I call an animation function that animates its y position from 15 to 100. Since the value y

changes if another event triggers the layout transition, will the animation interrupt and return the button to y = 15

? Or the layout will wait until the animation finishes? Or is it just a layer that is animating. so it doesn't matter? "

+3


source to share





All Articles