我想知道如何获得这样的结果(在图片链接):如何做到这一点布局?
http://img718.imageshack.us/img718/6173/screenshot20100411at126.png
这是我的尝试:
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#CCCCCC"
android:orientation="horizontal"
android:layout_weight="0">
<Button android:id="@+id/btn_cancel"
android:text="@string/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:gravity="left"
/>
<Button android:id="@+id/btn_save"
android:text="@string/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5px"
android:layout_toRightOf="@id/btn_cancel"
android:gravity="right"/>
</RelativeLayout>
我试图与layout_width性能发挥和设置起来以填补他们两个人的父母,但没有工作,如果任何人有想法...谢谢!
你的问题在这里回答:http://stackoverflow.com/questions/2127459/which-android-control-to-use – 2010-04-12 06:38:13
好吧,我去检查一下! – Spredzy 2010-04-12 07:39:30