我是一名有用的助手,可以为您进行文本翻译。以下是需要翻译的内容:
这基本上已经完成了任务。但是,这四张图片每一张都有很大的上下填充。我该如何摆脱它?或者我需要使用不同的布局类型吗?
为了帮助说明我的问题,这里有一张图片。 左边是我得到的,右边是我需要的。 Image 非常感谢!
祝好,马库斯!
我正在尝试在Android屏幕上对齐四个大小相等的正方形,我已经尝试了感觉像是数百万种不同的方法,但似乎没有一个方法能够奏效 :(。
目前我所拥有的是:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/MasterLayout" android:layout_width="wrap_content" android:layout_height="fill_parent" android:background="#FFFFFF">
<TableLayout android:layout_width="fill_parent" android:id="@+id/mainlay" android:background="#444444" android:layout_weight="0.2" android:layout_height="wrap_content" android:padding="0dip">
<TableRow android:layout_weight="1" android:background="#BBBBBB" android:padding="0dip">
<ImageView android:id="@+id/ImageView1" android:layout_marginLeft="10px" android:layout_weight="1" android:layout_marginRight="5px" android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="centerInside" android:src="@drawable/bigbox_new"></ImageView>
<ImageView android:id="@+id/ImageView2" android:layout_marginLeft="5px" android:layout_weight="1" android:layout_marginRight="10px" android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="centerInside" android:src="@drawable/bigbox_new"></ImageView>
</TableRow>
<TableRow android:layout_weight="1" android:padding="0dip">
<ImageView android:id="@+id/ImageView3" android:layout_marginLeft="10px" android:layout_weight="1" android:layout_marginRight="5px" android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="centerInside" android:src="@drawable/bigbox_new"></ImageView>
<ImageView android:id="@+id/ImageView4" android:layout_marginLeft="5px" android:layout_weight="1" android:layout_marginRight="10px" android:layout_height="wrap_content" android:layout_width="wrap_content" android:scaleType="centerInside" android:src="@drawable/bigbox_new"></ImageView>
</TableRow>
</TableLayout>
</LinearLayout>
这基本上已经完成了任务。但是,这四张图片每一张都有很大的上下填充。我该如何摆脱它?或者我需要使用不同的布局类型吗?
为了帮助说明我的问题,这里有一张图片。 左边是我得到的,右边是我需要的。 Image 非常感谢!
祝好,马库斯!