Android怎么实现Linearlayout的垂直分割线?

来源:互联网 发布:凯文老师的淘宝店 编辑:程序博客网 时间:2024/04/30 11:11
一定要参考这篇文章的连接
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2015/0105/2268.html

<LinearLayout xmlns:android=
"http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:orientation="horizontal" >
 
    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />
 
    <View 
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:background="@drawable/divider"/>
    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />
 
</LinearLayout>





0 0