方法1
直接使用<view>标签
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- 横线 -->
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FF0000"
/>
<!-- 竖线 -->
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="#FF0000"/>
</LinearLayout>