标签:圆角 渐变 back 学习 shape 内边 设置 top
shape 学习
目录
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape=["rectangle" | "oval" | "line" | "ring"] >
<corners
android:radius="integer"
android:topLeftRadius="integer"
android:topRightRadius="integer"
android:bottomLeftRadius="integer"
android:bottomRightRadius="integer" />
<gradient
android:angle="integer"
android:centerX="integer"
android:centerY="integer"
android:centerColor="integer"
android:endColor="color"
android:gradientRadius="integer"
android:startColor="color"
android:type=["linear" | "radial" | "sweep"]
android:useLevel=["true" | "false"] />
<padding
android:left="integer"
android:top="integer"
android:right="integer"
android:bottom="integer" />
<size
android:width="integer"
android:height="integer" />
<solid
android:color="color" />
<stroke
android:width="integer"
android:color="color"
android:dashWidth="integer"
android:dashGap="integer" />
</shape>
back to top
shape
设置形状
rectangel
设置矩形oval
设置椭圆line
设置线ring
设置圆环
back to top
corners
是圆角大小,也就是边边设置为圆形的弧度显著程度
包含
radius
总体的圆角程度topLeftRadius
左上方的圆角程度topRightRadius
右上方的圆角程度bottomLeftRadius
左下方的圆角程度bottomRightRadius
右下方的圆角程度
back to top
gradient
设置颜色渐变
centerX
,centerY
渐变的中心点(圆心)linear
线性渐变radial
放射渐变,gradientRadius
也必须设定sweep
扫描性渐变startColor
渐变起始的颜色centerColor
中心点颜色edgeColor
边缘颜色endColor
渐变结束的颜色angle
渐变的角度
back to top
padding
设置内边距
bottom
设置顶部内边距
left
设置左边内边距
right
设置右边内边距
top
设置顶部内边距
back to top
size
设置大小
width
设置宽度大小
height
设置高度大小
back to top
solid
设置填充颜色
color
设置内填充颜色
back to top
stroke
设置边框大小以及边框颜色
width
设置边框的大小
color
设置边框的颜色
back to top
标签:圆角,渐变,back,学习,shape,内边,设置,top 来源: https://www.cnblogs.com/Yunrui-blogs/p/12496052.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。