Android LinearLayout

Я ооочень в тупике, пытаясь получить макет, который мне нужен ... Я только начал с Android и играю с различными вариантами макета. Итак, в качестве эксперимента я хочу создать макет, который выглядит как

---------
|_______|
|   |   |
|   |   |
|   |   |
---------

Это то, что у меня есть до сих пор, и я получаю 3 столбца, причем крайний левый столбец является самым тонким столбцом.

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/firstlayout"
              android:layout_height="fill_parent"
              android:layout_width="fill_parent">

    <LinearLayout android:layout_height="fill_parent"
                  android:layout_width="0px"
                  android:layout_weight="0.1"
                  android:background="#0000FF"
                  android:orientation="horizontal"
                  android:gravity="top">

        <TextView android:layout_height="fill_parent"
                  android:layout_width="fill_parent"
                  android:text="Top Bar"
                  android:layout_gravity="center"/>

    </LinearLayout>


    <LinearLayout android:layout_height="fill_parent"
                  android:layout_width="0px"
                  android:layout_weight="0.9"
                  android:orientation="horizontal"
                  android:gravity="bottom">

        <LinearLayout android:layout_height="fill_parent"
                      android:layout_width="0px"
                      android:layout_weight="0.5"
                      android:background="#FF0000">

            <TextView android:layout_height="fill_parent"
                      android:layout_width="fill_parent"
                      android:gravity="center"
                      android:text="Bottom Left"/>

        </LinearLayout>
        <LinearLayout android:layout_height="fill_parent"
                      android:layout_width="0px"
                      android:layout_weight="0.5"
                      android:background="#00FF00">

            <TextView android:layout_height="fill_parent"
                      android:layout_width="fill_parent"
                      android:gravity="center"
                      android:text="Bottom Right"/>

        </LinearLayout>
    </LinearLayout>


</LinearLayout>

Может кто-нибудь сказать мне, что я я здесь ошибаюсь?

0
задан denniss 23 July 2011 в 03:33
поделиться