一定要参考这篇文章的连接
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>