效果图如下:
竖线
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#FF4081"//线的颜色
android:layout_gravity="center_horizontal"
/>
横线
<View android:layout_height="1dp"
android:layout_width="match_parent"
android:background="#FF4081"//线的颜色
/>