Android虚线分割Shape

来源:互联网 发布:网名生成器软件下载 编辑:程序博客网 时间:2024/06/06 00:38
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line">

     <!-- 显示虚线,破折线的宽度为dashWith,空隙的宽度为dashGap, darkgray -->

 <!-- 显示一条虚线,破折线的宽度为dashWith,破折线之间的空隙的宽度为dashGap,当dashGap=0dp时,为实线 -->  

    <stroke android:width="1dp" android:color="#A9A9A9"  
             android:dashWidth="2dp" android:dashGap="3dp" /> 
    <size android:height="1dp" />  
</shape>
原创粉丝点击