I am trying to setup a section of a screen with 4 images around each other but there is huge white space between them as per image example:
I would like them all right next to each other. Below is the XML I am using:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/imageView1"
android:src="@drawable/test1"
android:layout_weight="1"/>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/imageView2"
android:src="@drawable/test"
android:layout_weight="1"/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/imageView3"
android:src="@drawable/test1"
android:layout_weight="1"/>
<ImageView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/imageView4"
android:src="@drawable/test"
android:layout_weight="1"/>
</LinearLayout>
I am also trying to get them to the top of the screen but that white space is preventing that.
The images you see dont have any white space at all, the edge of the colors are the edge of the image?
Thanks