我正在开发一个 Android 应用程序,我想在其中使用虚线 XML 作为布局中的分隔符。为此,我为此使用了不同的可绘制对象,而是制作了一条虚线,它正在制作一条线。
我的drawable如下:
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="line">
<stroke
android:color="#FF404040"
android:width="1dp"
android:dashGap="3dp"
android:dashWidth="1dp"
/>
<size
android:height="3dp"
/>
</shape>