I am trying to create a Windows like tile structure for my app. Below is my XML file.
The problem is that I cannot get the 'Cat' image to fit in the gap.
http://www.tiikoni.com/tis/view/?id=b9a264b
That is to say, filling the screen with unequal ImageViews. Please help.
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#31352e" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="150dp"
android:layout_margin="5dp"
android:src="@drawable/xxx"
android:scaleType="fitXY"/>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="horizontal">
<ImageView
android:id="@+id/imageView2"
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_margin="5dp"
android:background="#fff"
android:padding="3dp"
android:scaleType="fitXY"
android:src="@drawable/dog1" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="200dp"
android:layout_height="250dp"
android:layout_margin="5dp"
android:background="#fff"
android:paddingLeft="3dp"
android:paddingRight="3dp"
android:paddingTop="3dp"
android:scaleType="fitXY"
android:src="@drawable/dog" />
</LinearLayout>>
<RelativeLayout
android:layout_width="200dp"
android:layout_height="180dp">
<ImageView
android:id="@+id/imageView4"
android:layout_width="200dp"
android:layout_height="150dp"
android:layout_margin="5dp"
android:background="#fff"
android:padding="3dp"
android:scaleType="fitXY"
android:src="@drawable/cat"
android:layout_below="@+id/imageView2"/>
</RelativeLayout>>
</LinearLayout>
</ScrollView>
Didn't allow me to attach snapshot. :(