how to add gradient to my rectangle shape dynamically in android?
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.
精彩评论