<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1.0dp"
android:color="@color/divider_strip_grey_color"
android:dashGap="2dp"
android:dashWidth="2dp" /> <!-- 虚线的高度 -->
<size android:height="1dp" />
<solid android:color="@color/white" />
</shape>
 <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/btn_submit"
android:layout_marginLeft="@dimen/common_padding_big"
android:layout_marginRight="@dimen/common_padding_big"
android:layout_marginTop="8.0dp"
android:background="@drawable/dashed_shape"
android:orientation="vertical"> <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="3.0dp"
android:background="@color/divider_line_grey_color"
android:text="@string/action_settings"
android:textColor="@color/category_left_font_default"
android:padding="8.0dp"/>
</LinearLayout>

效果图

如果想设置一和虚线的间隔 在shape文件加 入 android:shape="line"

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line">

android 虚线的更多相关文章

  1. Android 虚线分割Shape

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

  2. Android 虚线切割线

    drawable下新建一个虚线的xml.dash_line.xml <? xml version="1.0" encoding="utf-8"?> ...

  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. ASP.NET MVC 下拉框的传值的两种方式

    以前使用WebForm变成时,下拉框传值只需直接在后台绑定代码就可以了.现在我们来看看在MVC中DropDownList是如果和接受从Controller传过来的值的. 第一种:使用DropDownL ...

  2. linux(ubuntu)安装时遇到的问题

    window环境下安装linux虚拟机=时,由于在初始系统语言选择了中文,当linux虚拟机安装成功后, 按[Ctrl + alt +f1~f6]任一一键都行,进入到命令行模式,这时你会发现,哎,我的 ...

  3. Spring MVC 指导文档解读(一)

    22.1 指导文档章节 In the Web MVC framework, each DispatcherServlet has its own WebApplicationContext, whic ...

  4. I Hate It(hdu1754)(线段树区间最大值)

    I Hate It hdu1754 Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others ...

  5. 【整理】-- C++ 多线程

    os:ubuntu   c++ 1.创建线程 #include <iostream> #include <pthread.h> //多线程相关操作头文件,可移植众多平台 usi ...

  6. 用代码控制UI界面

           public class MainActivity extends Activity { //当第一次创建Activity时回调该方法 @Override protected void ...

  7. codeforces 425C

    题意:给定长度为n,m<=100000的范围在100000以内的数组a,b. 现在给定两种操作: 第一种是ai,bj相等,ai,bj之前的数全删掉,费用为e,收益为1 第二种是把剩下的全部删掉, ...

  8. Coins(HDU 2844):一个会超时的多重背包

    Coins  HDU 2844 不能用最基础的多重背包模板:会超时的!!! 之后看了二进制优化了的多重背包. 就是把多重转变成01背包: 具体思路见:http://www.cnblogs.com/tt ...

  9. h5专题常用小代码

    今天把做专题常用的js代码总结出来(持续更新),方便以后直接复制使用,不用老敲啊敲 1.屏幕适配JS代码 <script> var phoneScale = parseInt(window ...

  10. django rest_framework--入门教程3

    rest_framwork 之post 与put rest_framwork可以接受post与put delete get请求,可以对资源进行刚CRUD,以一个DEMO为例, 1.先在VIEW里定义一 ...