在布局中创建自定义分隔线

Create a custom divider in a layout

我想在我的布局中绘制自定义分隔线。我知道如何绘制直线分隔线,但我想要类似这样的东西:

我希望十字交叉线作为分隔线,并将视图的背景设置为与我们在这里的做法相同:

<View
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:background="@android:color/darker_gray"/>

您可以使用 平铺 xml 位图。

<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/back" 
    android:tileMode="repeat" />