在android中画一条虚线
2018-01-06 00:00
253 查看
摘要: 总结是使知识变成自己的唯一途径.除了你是创造者
1.在drawable 中创建一个文件 ;
2.在xml中使用
注意一定要添加layerType
1.在drawable 中创建一个文件 ;
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line"> <stroke android:width="1dp" android:color="#4cffffff" android:dashGap="5dp" android:dashWidth="5dp" /> </shape>
2.在xml中使用
<View android:id="@+id/dotted_line" android:layout_width="match_parent" android:layout_height="5dp" android:layout_marginLeft="13dp" android:layout_marginRight="13dp" android:background="@drawable/bg_dotted_line" android:layerType="software" />
注意一定要添加layerType
相关文章推荐
- android shape的应用之画一条虚线
- Android画一条虚线
- Android画一条虚线
- android画一条虚线
- 【Android开发笔记】光速码出一条万能虚线
- [转载]Android分割线divider(内含Android虚线分割线失效成实线解决方案)
- android中画虚线--.PathEffect类简单认识
- (OK) Android-x86-7.1.1/ kernel 4.4.62 - quagga - 改进多跳路由协议 - 为每一个目的地址仅生成一条路由表项 - MIMP - 3
- android 画虚线、实线,画圆角矩形,一半圆角
- Android分割线divider(内含Android虚线分割线失效成实线解决方案)
- 论如何画好一条虚线
- android中画虚线--.PathEffect类简单认识
- Android 中实现绘制虚线
- Android中一条最长短信所占的字节数
- 一条短信控制你的手机! Android平台的SQL注入漏洞浅析
- Android百度地图SDK上绘制虚线
- Android分割线divider(内含Android虚线分割线失效成实线解决方案)
- Android使用自定义view在指定时间内匀速画一条直线的实例代码
- Android实现画虚线的控件
- android 随手记-画虚线