shape 图形
主要属性: <?xml version="1.0"encoding="utf-8"?> 1、corners属性(圆角): <corners 2、gradient属性(渐变色): <gradient type:取值["linear" | "radial" | "sweep"]共有3中渐变类型,分别是线性渐变(默认)、放射渐变、扫描式渐变。 angle:仅对线性渐变有效,0为从左到右(逆时针旋转),必须为45的倍数,90为从下到上。 3、padding属性: <padding android:bottom="2dp" android:left="3dp"? android:right="3dp"? android:top="2dp"/> 4、size属性: <size android:width="180dp" android:height="100dp"/> 5、solid属性: ?<solid android:color="#ff5900"/> 6、stroke属性(描边): <stroke android:width="5dp"? android:color="@color/red" android:dashWidth="100dp" android:dashGap="50dp"/> 7、shape属性: <?xml version="1.0"encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="ring" android:dither="false" android:tint="@color/red" android:tintMode="src_atop" android:visible="true" android:innerRadius="100dp" android:innerRadiusRatio="20" android:thickness="100dp" android:thicknessRatio="6" android:useLevel="false"></shape> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |