开发者

Making a background rectangle with different colors in android

Is there way to make and Android background have different colored sides by using android:shape="rectangle" ? Right now I have it set but all the side of my view are the same color. Thanks very much. 开发者_开发百科


You can use a gradient color to fill your shape, meaning one side will have one color and the other side will have another color, with the color blending between the two sides.

A way to have 4 sides with different colors is use a nine-patch drawable, this isn't a shape anymore.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜