내가 지금 만 서로 다른 접근 방식 기분을 시도했다, 그러나 그들 중 누구도 :(제대로 작동하지 & 안드로이드 화면에 네 개의 같은 크기 사각형를 정렬하려고안드로이드 :. 네 개의 사각형
. 이것은 기본적으로 일을<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>
을하지만, 그 4 개 이미지의 모든 사람이 위의 거대한 패딩을 가지고 있으며, 그 아래 어떻게 내가 그 제거 않습니다. 나는 순간에있어 무엇
는이 다음이다 또는 다른 레이아웃 유형을 모두 사용해야합니까?
내 문제를 설명하기 위해 다음 그림이 있습니다. 왼쪽에는 내가 갖고있는 것이 있고, 오른쪽에는 내가 필요한 것입니다. Image
대단히 감사합니다.
건배, 마르쿠스!
감사합니다. fill_parent 레이아웃을 사용한이 트릭은 내가 찾고있는 것이었다. – metter