【发布时间】:2013-10-26 23:47:38
【问题描述】:
我在 TableLayout (TableRow) 中居中图像时遇到问题。 ImageView 总是在左侧,我需要让他居中。
这里是 XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#fff2d8">
<TableLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1">
<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:src="@drawable/logo"
android:id="@+id/imageView"
/>
</TableRow>
</TableLayout>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_margin="10dp"
android:layout_weight="1">
<TableRow
.
.
有布局图:screenshot
我该怎么做?非常感谢您的帮助。
问候,彼得
【问题讨论】: