0

画面の左半分に 1 つのリスト フラグメントを配置し、右側に 2 つの垂直方向に配置されたフラグメントを配置した単純な横長のレイアウトを表示したいと考えています。3 つすべてのフラグメントを水平方向に表示すると問題なく動作しますが、以下のレイアウトではリスト フラグメントのみが表示され、右側の垂直 LinearLayout 内の他の 2 つのフラグメントは表示されません。レイアウト パラメータのどこが間違っていますか?

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">

    <fragment class="com.copperykeenclaws.gameplanner.TeamListFragment"
        android:id="@+id/team_list_fragment"
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_weight="1"
        android:layout_width="0px"
        android:layout_height="wrap_content">
   </fragment>
   <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_weight="1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <FrameLayout android:id="@+id/team_details_frame" 
                android:layout_width="0px" 
                android:layout_height="wrap_content"/>
        <FrameLayout android:id="@+id/team_players_frame" 
                android:layout_width="0px" 
                android:layout_height="wrap_content"/>
    </LinearLayout>
</LinearLayout>

FrameLayouts は、FragmentTransactions でプログラムによって置き換えられます。これは、すべての水平レイアウトで正常に機能します。

4

1 に答える 1