私は Android を初めて使用しTabHost、LinearLayoutと を含むFrameLayoutを作成する場合TabWidget、宣言の順序が非常に重要であることに気付きました。たとえば、次を使用する場合:
<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp">
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="5dp" />
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>
</LinearLayout>
... がスペース全体を占有するTabWidetため、 は表示されません。FrameLayoutしかし、TabWidget最初に宣言すると:
<LinearLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp">
    <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="5dp" />
</LinearLayout>
...両方が表示されますが、TabWidget私が望むのは下ではなく上にあります。
layout_heightしたがって、他の要素が考慮される前に、特定の要素が完全な高さでレンダリングされることを「保証」できる仕様またはその他の属性があるかどうか疑問に思っていました。