学习Android界面开发: Shape Drawable
16lz
2021-12-04
用于绘制几何形状(geometric shape)
支持以下属性:
形状 android:shape
- rectangle 长方形
- ring 圆形
- oval 椭圆形
- line 直线
内边框填充
当Shape用作View的android:background时,Shape的
属性将应用于View。但是,当View显式设置了 时,Shape 的 无效。
填充颜色
填充渐变色
- android:startColor 起始色
- android:endColor 结束色
- android:centerColor 中间色
- android:centerX 横向中间位置
- android:centerY 纵向中间位置
注意:
会覆盖 属性
笔划
- android:width 粗细
- android:color 颜色
- android:dashGap 虚线间的间隔
- android:dashWidth 虚线的宽度
笔划可以是实线或者虚线。
同时设置android:dashWidth和android:dashGap时,笔划为虚线。
更多相关文章
- Android中RelativeLayout布局各个xml相对布局属性的介绍和使用
- [android]控件ImageView的常用属性
- Visual Studio跨平台开发实战(4) - Xamarin Android基本控制项介
- Android属性之build.prop,及property_get/property_set && Androi
- Android中attrs.xml文件的使用详解
- 【Android】TextView常用属性
- Android(安卓)在 LinearLayout 添加分割线 divider
- android属性详解
- android:padding和android:layout_margin的区别?