1

私は、かなり単純なフラグメントレイアウトになると思われるものを達成しようとしていますが、いくつかの問題があります。次のレイアウトの XML ソリューションを大まかに提案できますか (ネストされたフラグメントがサポートされるようになったことは承知していますが、可能であればこれを避けたいと思います)。

"==============================
| 111111111111111111 | 333333333 |
| | 111111111111111111 | 333333333 |
| | 111111111111111111 | 333333333 |
| | 111111111111111111 | 333333333 |
| | 111111111111111111 | 333333333 |
| | 111111111111111111 | 333333333 |
| | ================== | 333333333 |
| | 222222222222222222 | 333333333 |
| | 222222222222222222 | 333333333 |
"=============================

4

1 に答える 1

1

実にシンプルなレイアウトです。

これはあなたが探しているものですか?

ここに画像の説明を入力

コードは次のようになります。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical" >

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="#ff0000" >
        </FrameLayout>

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="2"
            android:background="#00ff00" >
        </FrameLayout>
    </LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="2"
        android:background="#0000ff" >
    </FrameLayout>

</LinearLayout>
于 2013-01-27T14:48:51.817 に答える