Android中加入水平线和垂直线

1.加入水平线

<View 
android:layout_height="0.5dip"
android:background="#686868"
android:layout_width="match_parent"/>

2.加入垂直线

<View 
android:layout_height="match_parent"
android:background="#686868"
android:layout_width="0.5dip"/>

3.其它 当然,你要像以下这样写也是没有问题的

<TextView 
android:layout_width="fill_parent" 
android:layout_height="0.5dp"  
android:background="#686868"/>

这样的垂直的就不说了 。大家都懂的

原文地址:https://www.cnblogs.com/cxchanpin/p/7094065.html