I would like to have a nested fragment which should take the rest of the space. The problem is that it even doesn't show because the height is 1 px. If I set the height to 300 dp for example everything looks ok. Here is my code. Maybe the layout cannot calculate what is the height of the other two layouts.:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="5dp"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/white_with_divider_bg"
android:id="@+id/firstL">
</RelativeLayout>
<RelativeLayout
android:id="@+id/secondL"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp">
</RelativeLayout>
<FrameLayout
android:id="@+id/child_fragment"
android:layout_height="0dip"
android:layout_width="match_parent"
android:layout_weight="1"/>
</LinearLayout>
It should look like this: