内部に 2 つの LinearLayouts を持つ FrameLayout があります。Android バージョン 4.x では問題なく動作しますが、バージョン 2.3 では LinearLayout が FrameLayout を垂直方向に塗りつぶしません。誰でも理由を教えてもらえますか? ところで、2番目の LinearLayout を非表示に設定していることは知っていますが、後でコードで表示します:)
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/list_left_border">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/maincontrols"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_weight="85"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/left_border_grey_width"
android:layout_marginStart="@dimen/left_border_grey_width"
android:layout_marginTop="10dp"
android:textSize="@dimen/choose_level_list_item_name_text_size"
android:textColor="#ff0000"
android:paddingLeft="5dp" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="@dimen/choose_level_list_item_description_text_size"
android:paddingLeft="5dp"
android:layout_marginLeft="@dimen/left_border_grey_width"
android:layout_marginStart="@dimen/left_border_grey_width"/>
</LinearLayout>
<RelativeLayout
android:layout_width="0dp"
android:layout_weight="15"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:id="@+id/progressBarContainer">
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/buttons"
android:visibility="invisible"
android:alpha="0.7" >
<Button
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight=".45"
android:text="@string/learn2"
android:id="@+id/buttonLearn"
android:layout_marginTop="0dp"
android:background="@drawable/button_learn_border"
android:layout_marginRight="10dp"
android:layout_marginEnd="10dp"
android:textColor="#000000"
android:gravity="center" />
<Button
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight=".45"
android:text="@string/test2"
android:id="@+id/buttonTest"
android:background="@drawable/button_test_bg"
android:textColor="#000000"
android:layout_marginTop="0dp"
android:gravity="center" />
</LinearLayout>
</FrameLayout>