开发者

Making a background rectangle with different colors in android

开发者 https://www.devze.com 2023-03-18 03:30 出处:网络
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.

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

精彩评论

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