在res/drawable目录下穿件shape的xml来实现圆角矩形效果。代码如下:
android:shape=”rectangle” >
android:bottomLeftRadius=”8dp”
android:bottomRightRadius=”8dp”
android:topLeftRadius=”8dp”
android:topRightRadius=”8dp” />
android:angle=”45″
android:centerColor=”#CCFFDD”
android:endColor=”#CCCCCC”
android:startColor=”#CCCCCC” />
android:bottom=”7dp”
android:left=”7dp”
android:right=”7dp”
android:top=”7dp” />
布局文件:
xmlns:tools=”http://schemas.android.com/tools”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:paddingBottom=