Android RelativeLayout中实现控件平分屏幕
转载出处:http://www.cnblogs.com/itinn/p/3758263.html?utm_source=tuicool&utm_medium=referral
<!--
RelativeLayout 达到平分效果
-->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/placeholder"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_centerHorizontal="true"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignRight="@id/placeholder"
android:layout_alignParentLeft="true"
android:text="Left"/>
<Button
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_alignLeft="@id/placeholder"
android:layout_alignParentRight="true"
android:text="Right"/>
</RelativeLayout>