Reputation: 6494
I'm trying to achieve what I though would be a reasonably straightforward fragment layout, but I'm having some problems. Can anyone suggest the XML solution, roughly, for the following layout (I'm aware that there is now support for nested fragments, but I'd like to avoid this if possible):
"============================="
| 111111111111111111 | 333333333 |
| 111111111111111111 | 333333333 |
| 111111111111111111 | 333333333 |
| 111111111111111111 | 333333333 |
| 111111111111111111 | 333333333 |
| 111111111111111111 | 333333333 |
| ================== | 333333333 |
| 222222222222222222 | 333333333 |
| 222222222222222222 | 333333333 |
"============================="
Upvotes: 1
Views: 232
Reputation: 7269
That is indeed a simple layout.
Is this what you are looking for?
The code would be the following:
<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>
Upvotes: 1