3つのレイアウトがあります。最初のレイアウトはプログラムでコンテンツを追加し、2番目のレイアウトはプログラムでコンテンツを追加して下部に配置し、3番目のレイアウトはフラグメントを配置します。40dp
高さをフラグメントに設定すると、下部のレイアウトに問題が表示されます。しかしwrap_content
、フラグメントに設定すると表示されません...
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<RelativeLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" />
<RelativeLayout
android:id="@+id/acts"
android:layout_width="match_parent"
//android:layout_height="wrap_content" <-id/frame not show
android:layout_height="40dp" <-id/frame show
android:layout_alignParentBottom="true" />
<FrameLayout
android:id="@+id/frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tabs"
android:layout_above="@id/acts" />
</RelativeLayout>