レイアウトに取り組んでいます。temp1はtemp2に含まれています。temp1は正常に機能していますが、これをtemp2に含めると。temp1のルートがfill_parentに設定されているため、画面全体に表示されます。この場合の解決策は何でしょうか?
中央のtemp2の小さな領域にtemp1のレイアウトを表示したいと思います。
temp1.xml
<RelativeLayout android:layout_height="fill_parent"
android:layout_width="fill_parent">
</RelativeLayout>
temp2.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:id="@+id/relativeLayout">
<include
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/temp1"/>
</RelativeLayout>
</RelativeLayout>