I am trying to implement a TableLayout
that has two columns and the second column is split into two rows. Something like this:
What i have so far is something like this which is basically creating three columns:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<TableRow
android:id="@+id/tr1"
android:layout_width="wrap_content"
android:layout_height="160dp"
>
<ImageView
android:src="@drawable/icon"
android:layout_span="1"
android:layout_height="160dp"
android:layout_width="200dp"
android:scaleType="centerCrop"
/>
<ImageView
android:src="@drawable/icon"
android:layout_height="75dp"
android:layout_width="wrap_content"
android:scaleType="centerCrop"
/>
<ImageView
android:src="@drawable/icon"
android:layout_height="75dp"
android:scaleType="centerCrop"
android:layout_width="wrap_content"/>
</TableRow>
</TableLayout>
You can achieve this via a combination of
LinearLayout
s instead ofTableLayout
:Here's the layout it'll produce: