zoukankan      html  css  js  c++  java
  • shape 学习

    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

    这是小睿的博客,如果需要转载,请标注出处啦~ヾ(≧▽≦*)o谢谢。
  • 相关阅读:
    delphi编程来记录QQ的聊天记录
    delphi编程模拟发送QQ2008消息!
    C++学习 破冰之旅
    C++ 宏和预编译 预编译头
    C++头文件讲解
    EXTJS将树拖拽到PANEL,drag tree drop into panel 实例
    JS数组声明技巧、数组动态添加元素
    JS二维数组的定义
    EXTJS 按钮添加右键
    提高SQL执行效率的几点建议
  • 原文地址:https://www.cnblogs.com/Yunrui-blogs/p/12496052.html
Copyright © 2011-2022 走看看