android画虚线
来源:互联网 发布:怎么运营淘宝店铺 编辑:程序博客网 时间:2024/06/05 18:03
一、我们先在drawable下新建一个bg_dotted_line文件
<?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:width="1dp" android:color="#000000" android:dashGap="5dp" android:dashWidth="5dp" /> <!-- 虚线高度 --> <size android:height="1dip" /></shape>
在主页面布局中引入
<View android:layout_width="match_parent" android:layout_height="5dp" android:layout_marginTop="10dp" android:background="@drawable/bg_dotted_line" android:layerType="software" />
虚线就显示出来了
二、采用repeat的方式展示图片
这是一个单元,我们可以让它重复,直到充满屏幕,这样的话,图片不会失真
我们先在drawable下新建一个firm_order_repeat_line文件
<?xml version="1.0" encoding="utf-8"?><bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@mipmap/firm_order_address_line" android:tileMode="repeat" />
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:background="@drawable/firm_order_repeat_line" />
0 0
- android 画虚线
- Android 画虚线边框
- Android 画虚线
- Android画一条虚线
- Android shape 画 虚线
- android画虚线
- Android画一条虚线
- Android 画虚线边框
- android画一条虚线
- android开发 画虚线
- android 随手记-画虚线
- Android下如何画虚线
- Android—shape画虚线
- android客户端学习-画虚线
- Android利用shape画虚线
- android利用shape画虚线
- android用shape画虚线
- android 使用shape 画虚线
- 网页数据抓取之读取网页数据
- (五十)socket编程——出错函数的封装和基于UDP的C/S模型
- 春节假期还挺忙
- JS——下拉搜索列表(模糊搜索匹配)
- 对线性回归、逻辑回归、各种回归的概念学习
- android画虚线
- 面向服务的分析与设计原理
- C2-1简单题目
- 剑指offer-面试题34-丑数
- ssh 所选的用户密钥未在远程主机上注册
- HTML DOM innerHTML 属性
- 解决Python查询Mysql数据库信息乱码问题
- 一元线性回归模型与最小二乘法及其C++实现
- Android 微信分享之图片加载失败