I'm having a problem with Android layout.. what I'm trying to create is something similar to this:
<table width="300px">
<tr>
<td span="2">test</td>
</tr>
<tr>
<td align="right">image1</td>
<td align="right">image2</td>
</tr>
</table>
Except I'd want "image1" and 2 to be together. Anyways,
Here is the layout I'm using in Android:
<?xml version="1.0" encoding="UTF-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow android:layout_gravity="left" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_column="1"
android:layout_gravity="left|center_vertical"
android:layout_span="2"
android:paddingRight="5dip"
android:textColor="#ffffffff"
android:textSize="13dip" />
</TableRow>
<TableRow android:layout_gravity="right" >
<ImageView
android:layout_width="50px"
android:layout_height="120px"
android:layout_column="1"
android:layout_marginLeft="15dip" />
<ImageView
android:layout_width="263px"
android:layout_height="150px"
android:layout_column="2"
android:layout_marginLeft="15dip" />
</TableRow>
</TableLayout>
I have also tried putting android:layout_gravity:"right" on the ImageViews themselves, which did nothing.
For some reason, this Android layout always indents the label (it doesn't span the columns), and never right aligns anything in the second row.. I don't know what I'm doing wrong. This is Android 2.1. Anyone know?