android 圆角矩形,渐变颜色,自定义
首先,在drawable目录下写一个xml,名字随便起(只要符合规范),代码如下:
<span style="color:#009900;"><span style="background-color: rgb(255, 255, 255);"><?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:angle="270" android:startColor="#19B001" android:endColor="#19B001" /> <corners android:bottomLeftRadius="@dimen/dp5" android:bottomRightRadius="@dimen/dp5" android:topLeftRadius="@dimen/dp5" android:topRightRadius="@dimen/dp5" /> </shape></span><span style="font-size:10px;"> </span></span>
原文地址:http://blog.csdn.net/u012301841/article/details/41346921