码迷,mamicode.com
首页 > 移动开发 > 详细

Android 虚线分割线

时间:2014-10-16 10:05:52      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:虚线

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 虚线分割线

标签:虚线

原文地址:http://blog.csdn.net/tz2101/article/details/40142607

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!