shape 画图
来源:互联网 发布:淘宝开店怎么推广宣传 编辑:程序博客网 时间:2024/05/29 16:51
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"><!-- 圆角 --><corners android:radius="9dp" android:topLeftRadius="2dp" android:topRightRadius="2dp" android:bottomLeftRadius="2dp" android:bottomRightRadius="2dp"/><!-- 设置圆角半径 --><!-- 渐变 --><gradient android:startColor="@android:color/white" android:centerColor="@android:color/black" android:endColor="@android:color/black" android:useLevel="true" android:angle="45" android:type="radial" android:centerX="0" android:centerY="0" android:gradientRadius="90"/><!-- 间隔 --><padding android:left="2dp" android:top="2dp" android:right="2dp" android:bottom="2dp"/><!-- 各方向的间隔 --><!-- 大小 --><size android:width="50dp" android:height="50dp"/><!-- 宽度和高度 --><!-- 填充 --><solid android:color="@android:color/white"/><!-- 填充的颜色 --><!-- 描边 --><stroke android:width="2dp" android:color="@android:color/black" android:dashWidth="1dp" android:dashGap="2dp"/></shape>
填充:设置填充的颜色
间隔:设置四个方向上的间隔
大小:设置大小
圆角:同时设置五个属性,则Radius属性无效
android:Radius="20dp" 设置四个角的半径
android:topLeftRadius="20dp" 设置左上角的半径
android:topRightRadius="20dp" 设置右上角的半径
android:bottomLeftRadius="20dp" 设置右下角的半径
android:bottomRightRadius="20dp" 设置左下角的半径
描边:dashWidth和dashGap属性,只要其中一个设置为0dp,则边框为实现边框
android:width="20dp" 设置边边的宽度
android:color="@android:color/black" 设置边边的颜色
android:dashWidth="2dp" 设置虚线的宽度
android:dashGap="20dp" 设置虚线的间隔宽度
渐变:当设置填充颜色后,无渐变效果。angle的值必须是45的倍数(包括0),仅在type="linear"有效,不然会报错。android:useLevel 这个属性不知道有什么用。
0 0
- shape 画图
- shape画图(转)
- android 使用shape画图
- android画图-----shape的使用
- android画图-----shape的使用
- android画图-----shape的使用
- Android开发中Shape画图
- android画图-----shape的使用文档信息
- android画图-----shape的使用文档…
- shape画图底部边框出不来的解决方法
- Stroking or Filling a Shape:画图或填充图形
- Android xml中shape(画图)的使用
- shape
- Shape
- shape
- shape
- Shape
- shape
- SurfaceView的看法
- TCP三次握手和四次挥手
- HDU 5807 BestCoder Round #86 Keep In Touch (分段式DP)
- leetcode--17. Letter Combinations of a Phone Number
- P.V操作原语和信号量(搜狐面试题)
- shape 画图
- 欢迎使用CSDN-markdown编辑器
- 正整数的因子与质因子
- Jquery Validate 相关参数及常用的自定义验证规则
- Ubuntu LINUX安装 apache-ofbiz-13.07.03
- Python爬虫系列博客
- Hibernate Tools 从DB2数据库中逆向工程生成实体类的问题
- OmniMarkupPreviewer的实时预览无法使用问题的解决
- JS引入命名空间(并使用字符串拼接和拖拽)