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 ...
 
随机推荐
- 用函数datepart获取当前日期、周数、季度
			
用函数datepart处理就可以了,示例:select datepart(weekday,getdate()) as 周内的第几日select datepart(week,getdate()) as ...
 - JS,数组小练习
			
var arr = [4, 0, 7, 9, 0, 0, 2, 6, 0, 3, 1, 0];要求将数组中的0项去掉,将不为0的值存入一个新的数组,生成新的数组 p.p1 { margin: 0.0p ...
 - IOS-synthesize和dynamic的异同(转)
			
一,retain, copy, assign区别 1. 假设你用malloc分配了一块内存,并且把它的地址赋值给了指针a,后来你希望指针b也共享这块内存,于是你又把a赋值给(assign)了b.此时a ...
 - 转 父表字表统计查询的sql练习
			
create table father( f_id number(2) primary key, f_name varchar2(10) ); create table s ...
 - 深入浅出话VC++(1)——Windows程序内部运行机制
			
一.引言 要想熟练掌握Windows应用程序的开发,首先需要理解Windows平台下程序运行的内部机制,然而在.NET平台下,创建一个Windows桌面程序,只需要简单地选择Windows窗体应用程序 ...
 - ubuntu下配置安装PYQT4
			
apt-get安装(快) sudo apt-get install libxext6 libxext-dev libqt4-dev libqt4-gui libqt4-sql qt4-dev-tool ...
 - python 处理中文文件时的编码问题,尤其是utf-8和gbk
			
python代码文件的编码 py文件默认是ASCII编码,中文在显示时会做一个ASCII到系统默认编码的转换,这时就会出错:SyntaxError: Non-ASCII character.需要在代码 ...
 - MySQL prepare 原理
			
Prepare的好处 Prepare SQL产生的原因.首先从mysql服务器执行sql的过程开始讲起,SQL执行过程包括以下阶段 词法分析->语法分析->语义分析->执行计划优化 ...
 - ARCGIS FOR JAVASCRIPT API 出现multipleDefine问题
			
问题: Error {src: "dojoLoader", info: Object, stack: (...), message: "multipleDefine&qu ...
 - Eclipse配置详解(包括智能提示设置、智能提示插件修改,修改空格自动上屏、JDK配置、各种快捷键列表……)
			
Eclipse编辑器基本设置 1.添加行号 在边缘处右键 2.改字体 字体的一般配置 3.去掉拼写错误检查 4.Java代码风格 代码格式化 Ctrl + Shift + F 之后点击右边的New按钮 ...