用于绘制几何形状(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时,笔划为虚线。

更多相关文章

  1. Android中RelativeLayout布局各个xml相对布局属性的介绍和使用
  2. [android]控件ImageView的常用属性
  3. Visual Studio跨平台开发实战(4) - Xamarin Android基本控制项介
  4. Android属性之build.prop,及property_get/property_set && Androi
  5. Android中attrs.xml文件的使用详解
  6. 【Android】TextView常用属性
  7. Android(安卓)在 LinearLayout 添加分割线 divider
  8. android属性详解
  9. android:padding和android:layout_margin的区别?

随机推荐

  1. sqlserver中获取月份的天数的方法分享
  2. sqlserver中如何查询出连续日期记录的代
  3. SQLserver 数据库危险存储过程删除与恢复
  4. mssql中获取指定日期所在月份的第一天的
  5. SQL集合函数中case when then 使用技巧
  6. sql ntext数据类型字符替换实现代码
  7. sql 自定义百分比转换小数函数代码
  8. 分享SQL Server删除重复行的6个方法
  9. 合并SQL脚本文件的方法分享
  10. 数据库中identity字段不必是系统产生的唯