android 虚线
<?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 虚线的更多相关文章
- Android 虚线分割Shape
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http: ...
- Android 虚线切割线
drawable下新建一个虚线的xml.dash_line.xml <? xml version="1.0" encoding="utf-8"?> ...
- Android 虚线实现绘制 - DashPathEffect
前言: 通过view绘制虚实线,采用Android自带API--DashPathEffect.具体使用请参考更多的链接,这里只是讲解. 构造函数 DashPathEffect 的构造函数有两个参数: ...
- 【转】Android设置虚线、圆角、渐变
Android虚线圆角渐变 有图又真相,先上图再说. 点击效果: 设置虚线: <?xml version="1.0" encoding="utf-8" ...
- android 自定义控件——(三)水平线、虚线
----------------------------------View虚线或者直线(源代码下有属性解释)--------------------------------------------- ...
- android 画虚线、实线,画圆角矩形,一半圆角
1.画虚线,实线: 建立dotted_line_gray.xml文件放在drawable文件夹下面. android:shape="line" 可以修改你想要的形状 <?xm ...
- Android:res之shape制作圆角、虚线、渐变
xml控件配置属性 android:background="@drawable/shape" 标签 corners ----------圆角gradient ----------渐 ...
- 44.Android之Shape设置虚线、圆角和渐变学习
Shape在Android中设定各种形状,今天记录下,由于比较简单直接贴代码. Shape子属性简单说明一下: gradient -- 对应颜色渐变. startcolor.endcolor就不多说 ...
- android画虚线的自定义VIew
package com.yesway.ycarplus.view; import android.annotation.SuppressLint; import android.content.Con ...
随机推荐
- Jade之Mixins
Mixin mixin允许我们对某一个块的重复使用,类似于函数. 用法:首先声明mixin,然后使用(在mixin名字之前加+即可以使用)即可. 最简单的mixin jade: //- 声明 mixi ...
- tesseract api C++使用例子
转自:https://code.google.com/p/tesseract-ocr/wiki/APIExample APIExample API examples Updated Aug 12, 2 ...
- VMware vSphere 5.1 简介与安装
虚拟化系列-VMware vSphere 5.1 简介与安装 标签: 虚拟化 esxi5.1 VMware vSphere 5.1 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 . ...
- C# Delegate 匿名 Delegate
C#6.0新添加了 lambda的强力支持,用lambda的确可以节省好多代码,让代码看起来更简洁,更直观: 这里做一个笔记,C#的匿名委托 Demo class Program { static v ...
- node应用场景
2.1 Web开发:Express + EJS + Mongoose/MySQL express 是轻量灵活的Nodejs Web应用框架,它可以快速地搭建网站.Express框架建立在Nodejs内 ...
- Ubuntu安装sougou输入法
1. 按照[1]的步骤进行,完美实现就好. 2. 必须重启后才能实现功能. Reference: [1] http://pinyin.sogou.com/linux/
- Yaf零基础学习总结3-Hello Yaf
Yaf零基础学习总结3-Hello Yaf 上一次我们已经学习了如何安装yaf了,准备工作做好了之后我们来开始实际的编码了,码农都知道一个经典的语句就是“Hello World”了,今天我们开始入手Y ...
- SQLLDR记录数与文本记录数比较
我们平时都用sqlldr进行将文本数据加载到数据库,但是有时候由于数据问题导致入库率不能达到100%,因此我们要检测是否存在不能入库的数据记录.以下shell脚本就是统计文本中记录数和数据库中记录数是 ...
- Android 控件架构
如果说Android上的app是一个有血有肉的人的话,那么人靠衣装马靠鞍,那么控件就是把app装扮的漂漂亮亮的“衣服”.那么安卓的控件到底是如何架构,又是如何渲染的了. 无论是什么控件,在Androi ...
- Asp.Net Web API 2第十七课——Creating an OData Endpoint in ASP.NET Web API 2(OData终结点)
前言 很久没更新博客了,加上刚过年,现在准备重新开战,继续自己的学习之路.本文已同步到Web API2系列文章中http://www.cnblogs.com/aehyok/p/3446289.html ...