【android】用drawable xml绘制虚线分割线
16lz
2021-01-23
drawable下新建一个虚线的xml,dash_line.xml
[java] view plain copy print ?
- <?xmlversion="1.0"encoding="utf-8"?>
- <shapexmlns: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"/>
- <!--虚线的高度-->
- <sizeandroid:height="1dp"/>
- </shape>
然后再布局引用就ok了。
转自:http://blog.csdn.net/tz2101/article/details/40142607
更多相关文章
- android之4.0控件switch自定义开关背景图片和控制宽度
- android使用MPAndroidChart开源图表折线图
- android获取控件宽度
- android虚线
- Android WebView内容宽度自适应
- (4.2.15.1)【android开源工具】安卓图表引擎AChartEngine(三) - 示
- android中画虚线--.PathEffect类简单认识
- Android 四种获取屏幕宽度的方法总结