我有2个像这样的ImageButons
我已经尝试了一切,使其在屏幕中心正确对齐.作为Android新手,我没有任何其他线索可以做什么.如何实现我在屏幕中心对齐这两个图像按钮的目标
这是我的布局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>
Run Code Online (Sandbox Code Playgroud)