Vih*_*rma 5 xml android paint stroke
我有一个虚线分隔符
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<!--
#17b851 #C7B299
-->
<stroke
android:color="#9e9c85"
android:dashWidth="10px"
android:dashGap="10px"
/>
</shape>
Run Code Online (Sandbox Code Playgroud)
现在它几乎看不到.我怎样才能让它变厚.我尝试给android:height ="2px"和android:dashHeight ="5px",但它没有用.
行程WIDTH必须小于HEIGHT的大小.
(笔划宽度是线条的宽度.尺寸高度是可绘制的高度.绘制时,线条在可绘制的中心.如果尺寸高度<=笔划宽度,则线条不会显示.)
dottedline.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line" >
<stroke
android:dashGap="3dp"
android:dashWidth="3dp"
android:width="2dp"
android:color="@android:color/black" />
<size android:height="3dp" />
</shape>
Run Code Online (Sandbox Code Playgroud)
布局xml:
<ImageView
android:layerType="software"
android:contentDescription="underline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/dottedline" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4919 次 |
| 最近记录: |