开发者

how to add gradient to my rectangle shape dynamically in android?

开发者 https://www.devze.com 2023-02-08 07:49 出处:网络
I have created re开发者_开发百科ctangle shapes using onDraw method, filled with single colors. Now I have arequirement to add gradient effects to those rectangles. Now I have to fill each rectangle wi

I have created re开发者_开发百科ctangle shapes using onDraw method, filled with single colors. Now I have a requirement to add gradient effects to those rectangles. Now I have to fill each rectangle with multiple colors(i.e gradient effect). Could some one suggest me the way to do that. Any response would be great.

thanks in advance.


See the LinearGradient class in the Android graphics library.

0

精彩评论

暂无评论...
验证码 换一张
取 消