I can't figure out how my layout should look like. I have a fragment. Inside it, I have scrollView (as I wish to support both orrientations), inside ScrollView I would like to have four images evenly distributed ( like this http://numberexplosion.com/wp/wp-content/uploads/2012/04/square-4.gif ). But I just can't figure out a way to do it, I have tried relative, linear, tablelayouts, but can't get such view :/.
My current layout:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:gravity="center_vertical|center_horizontal" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="150dp"
android:layout_height="150dp" />
<ImageView
android:id="@+id/ImageVieww2"
android:layout_width="150dp"
android:layout_height="150dp" />
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal" >
<ImageView
android:id="@+id/ImageVieww3"
android:layout_width="150dp"
android:layout_height="150dp" />
<ImageView
android:id="@+id/ImageVieww4"
android:layout_width="150dp"
android:layout_height="150dp" />
</TableRow>
<TableRow
android:id="@+id/tableRow3"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</TableRow>
</TableLayout>
</ScrollView>
This layout looks nearly as I wish it to be, but the image size is only 150dp, and not filling the whole screen in some cases. My imageView sources are different, but I would like to imageViews to fill my fragment. Any ideas what I'm doing wrong?