0

サーバーから取得したXMLがあり、次のようなHTMLテーブルがあります。

<table>
    <tr>
        <td colspan="4">$kolumn1$</td>
    </tr>
    <tr>
        <td colspan="2">$kolumn2$</td>
        <td>$kolumn3$</td>
        <td>$kolumn4$</td>
    </tr>
    <tr>
        <td>$kolumn5$</td>
        <td colspan="3">$kolumn1$</td>
    </tr>
</table>

そして今、私は次のようなAndroidTableLayoutを作成したいと思います。

<TableRow
    android:layout_width="fill_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_span="4" />
</TableRow>

<TableRow
    android:layout_width="fill_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_span="2" />

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent" />

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent" />
</TableRow>

<TableRow
    android:layout_width="fill_parent"
    android:layout_height="match_parent" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent" />

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="match_parent"
        android:layout_span="3" />
</TableRow>

HTMLコードからTableLayoutを作成するための最良の方法は何ですか?

4

1 に答える 1

0

これを試して:

 I have to like create Relative layout inside the TableRow
 And put the components to Relative layout
 It's worked me. I hope this will be worked for you also..
于 2013-02-06T13:18:07.277 に答える