5
< RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
< Button android:text="Previous"
android:layout_height="wrap_content"
android:id="@+id/MeasurePrev"
android:layout_alignParentBottom="true"
android:layout_width="wrap_content">
</Button>
</RelativeLayout >
任何人都可以告訴我如何使用Java代碼或在活動類中執行此操作? 我不知道如何設置android:layout_alignParentBottom =「true」。 我想通過java代碼實現整個視圖。如何通過代碼在RelativeLayout中定位Button?
它可以正常使用。謝謝Sephy – 2010-07-28 09:20:20
如果有人需要在你的代碼中設置'android:layout_alignParentBottom =「false」''params1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,0);' – bancer 2012-04-05 03:28:18