我有2個ImageButons這樣安卓:中心對齊ImageButtons
我想盡一切辦法讓它在屏幕中心正確對齊。作爲Android的新手,我沒有任何其他線索可以做什麼。我如何能實現我的屏幕
的定心這2個Imagebuttons的目標,這是我的佈局XML
<TableLayout android:id="@+id/TableLayout01"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow android:id="@+id/TableRow01" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton android:id="@+id/btn_Show"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Show" android:src="@drawable/cmd_result_show"
android:layout_gravity="right" android:background="@android:color/transparent" />
<ImageButton android:id="@+id/btn_showAll"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="Detailed Show" android:layout_gravity="center"
android:src="@drawable/cmd_result_details" android:background="@android:color/transparent" />
</TableRow>
</TableLayout>
請添加哪些人爲您工作的評論,或者您有任何問題......並且接受正確的答案。 – Mathew 2011-03-16 05:56:45