0
如何最小化圖像視圖左側和右側的間距?我的xml文件在圖像的左側和右側顯示了很多空間。我的屏幕看起來是這樣的:如何減少我的屏幕左側和右側的空白?
,我想讓它像這樣:
如何減少間距上的圖像的左側和右側?
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/img1"
android:layout_width="70dp"
android:layout_height="80dp"
android:contentDescription="@null"
android:background="@drawable/imagebgborder"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/txt1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:textStyle="bold"
android:contentDescription="@null"
android:text="@string/hello_world" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:orientation="vertical" >
<ImageView
android:id="@+id/img2"
android:layout_width="70dp"
android:layout_height="80dp"
android:contentDescription="@null"
android:background="@drawable/imagebgborder"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/txt2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:contentDescription="@null"
android:text="@string/hello_world" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/img3"
android:layout_width="70dp"
android:layout_height="80dp"
android:contentDescription="@null"
android:background="@drawable/imagebgborder"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/txt3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:contentDescription="@null"
android:text="@string/hello_world" />
</LinearLayout>
</LinearLayout>
代碼顯示垂直 – user2589245
屏幕看起來這艾克現在http://imgur.com/mD5K2wP – user2589245
我不好,我工作的另一個項目和沒」 t測試了這一點。嘗試使用TableLayout的上述更新。 –