Android のレイアウトに問題があります。作成しようとしているのは、次のようなものです。
<table width="300px">
<tr>
<td span="2">test</td>
</tr>
<tr>
<td align="right">image1</td>
<td align="right">image2</td>
</tr>
</table>
「image1」と2を一緒にしたいのですが。いずれかの方法、
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>
また、ImageViews 自体に android:layout_gravity:"right" を配置しようとしましたが、何もしませんでした。
何らかの理由で、この Android レイアウトは常にラベルをインデントし (列にまたがることはありません)、2 行目に右揃えすることはありません。何が間違っているのかわかりません。これは Android 2.1 です。誰でも知っていますか?