zoukankan      html  css  js  c++  java
  • android shape

    shape使用、渐变色、分割线、边框、半透明、半透明阴影效果。

    http://www.tuicool.com/articles/Q7Vree

    <?xml version="1.0" encoding="utf-8"?>
    <shape
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape=["rectangle" | "oval" | "line" | "ring"] >   --- 默认为rectangle
        <corners  -- shape=“rectangle”时使用, 
            android:radius="integer"  -- 半径,会被下边的属性覆盖,默认为1dp,
            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    -- 指定大小,一般用在imageview配合scaleType属性使用。大小一般会适配滴
            android:width="integer"
            android:height="integer" />
        <solid    -- 填充颜色,可是是十六进制颜色。(比如想设置半透明效果,直接使用十六就只就OK)
            android:color="color" />
        <stroke    -- 指定边框,border,dashWidth和dashGap有一个为0dp则为
            android:width="integer"
            android:color="color"
            android:dashWidth="integer"    -- 虚线宽度
            android:dashGap="integer" />    -- 虚线间隔宽度
    </shape>
  • 相关阅读:
    activiti app 6.0 乱码
    扫盲--CRM系统和ERP系统的区别
    GraphQL实战-第四篇-构建开发框架
    GraphQL实战-第三篇-spring Boot 实现
    GraphQL实战-第二篇-java实现及分析
    GraphQL实战-第一篇-GraphQL介绍
    @PostConstruct及跳坑记录
    jmeter元件的介绍
    Docker之5. 容器的操作
    Docker之4. 镜像的操作
  • 原文地址:https://www.cnblogs.com/easeyeah/p/4336186.html
Copyright © 2011-2022 走看看