您的位置:首页 > 移动开发 > Android开发

Android Linearlayout 添加分割线

2013-10-11 11:26 323 查看
只要在xml 添加 就可以了

<?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="horizontal"

    android:divider="@drawable/muti_dialog_horizontal_split"

    android:showDividers="middle"

     >

    

    <Button 

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

        android:layout_weight="1"

        android:text="button"

        android:background="@drawable/group_touch_background"

        />

    

    <Button 

        android:layout_width="wrap_content"

        android:layout_height="wrap_content"

         android:layout_weight="1"

          android:background="@drawable/group_touch_background"

        android:text="按钮1"

        />

    

</LinearLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: