Reputation: 3330
For the <gradient>
in Android, I cannot understand the meaning of the centerX
and centerY
attributes and how their values affect the shape.
Also what is the meaning of the gradient type sweep
?
Thanks in advance.
Upvotes: 2
Views: 347
Reputation: 2460
android:centerX
and android:centerY
default values are 0.5.
0.5 is the center of the view, their range of values are from 0 to 1, being centerX=centerY=0 the upper-left corner of the screen and centerX=centerY=1 the bottom-right corner if the view fills the screen.
Sweep is a kind of circular gradient. Imagine a wide paint brush were one of the sides is sticked and you make a complete circular movement. The effect is like a conic looked from above.
Upvotes: 1