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
android view draw


source to share


No one has answered this question yet

Check out similar questions:

685
Android separator / line separator in layout?
18
Can anyone provide a good example of a custom view group containing a custom view with examples of measures and layouts? (In Java)
12
Android issues: converting ViewGroup with children to bitmap
1
android broadcast animation clips part of the view not shown on screen
1
How does a RelativeLayout in a custom ViewGroup get its dimension?
1
How to inflate a RelativeLayout in a custom ViewGroup
0
Custom views added to horizontal scrolling are not displayed if the scrollview is larger than the screen
0
Android Draw over EditText, Spinner or Button (Draw on Screen)
0
Dynamically changing placement of child views using onDraw?
-1
Complex RelativeLayout-View - Performance Issue



All Articles
Loading...
X
Show
Funny
Dev
Pics