代码改变世界

【android】两个按钮的宽度各占屏幕的一半

2012-08-09 11:10  Loull  阅读(534)  评论(0编辑  收藏  举报
两个按钮的宽度各占屏幕的一半
<LinearLayout>
  <Button android:layout_height="wrap_content"
          android:layout_width="fill_parent" android:layout_weight="1"/>

  <Button android:layout_height="wrap_content"
          android:layout_width="fill_parent" android:layout_weight="1"/>
</LinearLayout>