码迷,mamicode.com
首页 > 其他好文 > 详细

RelativeLayout中实现控件平分屏幕

时间:2016-01-22 03:04:55      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

<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>

  

RelativeLayout中实现控件平分屏幕

标签:

原文地址:http://www.cnblogs.com/qing123/p/5150075.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!