drawable下新建一个虚线的xml。dash_line.xml

<?

xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" > <!-- 显示一条虚线,破折线的宽度为dashWith,破折线之间的空隙的宽度为dashGap。当dashGap=0dp时。为实线 -->
<stroke
android:dashGap="2dp"
android:dashWidth="2dp"
android:color="#000" /> <!-- 虚线的高度 -->
<size android:height="1dp" /> </shape>

然后再布局引用就ok了。

Android 虚线切割线的更多相关文章

  1. android 虚线

    <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http: ...

  2. Android 虚线分割Shape

    <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http: ...

  3. Android 虚线实现绘制 - DashPathEffect

    前言: 通过view绘制虚实线,采用Android自带API--DashPathEffect.具体使用请参考更多的链接,这里只是讲解. 构造函数 DashPathEffect 的构造函数有两个参数: ...

  4. 【转】Android设置虚线、圆角、渐变

      Android虚线圆角渐变 有图又真相,先上图再说. 点击效果: 设置虚线: <?xml version="1.0" encoding="utf-8" ...

  5. android 自定义控件——(三)水平线、虚线

    ----------------------------------View虚线或者直线(源代码下有属性解释)--------------------------------------------- ...

  6. android 画虚线、实线,画圆角矩形,一半圆角

    1.画虚线,实线: 建立dotted_line_gray.xml文件放在drawable文件夹下面. android:shape="line" 可以修改你想要的形状 <?xm ...

  7. Android:res之shape制作圆角、虚线、渐变

    xml控件配置属性 android:background="@drawable/shape" 标签 corners ----------圆角gradient ----------渐 ...

  8. 44.Android之Shape设置虚线、圆角和渐变学习

    Shape在Android中设定各种形状,今天记录下,由于比较简单直接贴代码. Shape子属性简单说明一下:  gradient -- 对应颜色渐变. startcolor.endcolor就不多说 ...

  9. android画虚线的自定义VIew

    package com.yesway.ycarplus.view; import android.annotation.SuppressLint; import android.content.Con ...

随机推荐

  1. 花匠(NOIP2013)(神奇纯模拟)

    原题传送门 这是道很奇怪的题目,真不知道为什么要放到T2. 也许是T1太水了 首先先看题, 题目要求一个数列中下标为偶数的点比临近的下表为奇数的点更大或更小 其实就是说在原数组中找到一个最长的波动数列 ...

  2. dll共享段中一些需要注意的问题

    Visual C++ 如何与应用程序或其他 DLL 共享自己 DLL 中的数据? Win32 DLL 映射到调用进程的地址空间中.默认情况下,每个使用 DLL 的进程都有自己的所有 DLL 全局变量和 ...

  3. Codeforces Round #191 (Div. 2) A. Flipping Game【*枚举/DP/每次操作可将区间[i,j](1=<i<=j<=n)内牌的状态翻转(即0变1,1变0),求一次翻转操作后,1的个数尽量多】

    A. Flipping Game     time limit per test 1 second memory limit per test 256 megabytes input standard ...

  4. 版本控制[0] -> git -> 使用 git 进行版本控制

    版本控制 / Version Control 目录 git-版本控制 / git-Version Control git-常用命令 / git-Freq Command git-文件忽略 / git- ...

  5. Number of Connected Components in an Undirected Graph -- LeetCode

    Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), ...

  6. 「CTSC2018」假面

    真~签到题qwq 昨天在考场上先写了个70分暴力dp,然后发现好像可以优化.因为结界技能的模型相当于要求出 对于每个物品,仅仅不选它的背包是什么....  于是当场脑补出两种做法: 前缀和后缀背包卷积 ...

  7. LA 3026 Period

    这只是蓝书上的一道KMP水题...然后对于最长前缀的循环证明我就不说了... #include<iostream> #include<cstring> #include< ...

  8. centos安装postgresql-10及操作

    安装postgresql: Linux启动: service postgresql start 创建用户: createuser username 创建数据库: createdb dbname -O ...

  9. Linux Whois命令安装与使用

    大家都知道查看域名的详细信息,都是跑去whois服务器去查询,如 http://whois.chinaz.com 其实在Linux下直接有一个whois的命令,不过需要安装jwhois才可以,以Cen ...

  10. 集合框架(高级for的使用)

    高级for循环 格式: for(数据类型 变量名 :被遍历的集合(collection)或者数组){} 对集合进行遍历,只能获取元素,但是不能对元素进行过多的操作 迭代器除了遍历,还可以进行remov ...