I have a dotted line separator
<?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>
Right now its barely visible. How can I make it thick . I tried giving android:height="2px" & android:dashHeight="5px" but it didnt work.
Stroke WIDTH must be smaller than the size HEIGHT.
(Stroke width is the width of the line. Size height is the height of the drawable. When drawn, the line is centered in the drawable. If size height <=stroke width, the line won't show up.)
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>
the layout xml:
<ImageView
android:layerType="software"
android:contentDescription="underline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/dottedline" />
You can use stroke width,
android:width="3dp"
snapshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With