main.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/root"

    android:orientation="vertical"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent"

    >

<LinearLayout android:id="@+id/bodyLayout"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="#654321"

android:layout_weight="1">

</LinearLayout>

<LinearLayout android:id="@+id/menu"

android:layout_width="fill_parent"

android:layout_height="50dp"

android:background="#123456">

</LinearLayout>

</LinearLayout>


home.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout

  xmlns:android="http://schemas.android.com/apk/res/android"

  android:orientation="vertical"

  android:layout_width="fill_parent"

  android:layout_height="fill_parent"

  android:background="#ffffff">

<TextView android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:gravity="center"

android:text="HOME PAGE"/>

</LinearLayout>


bodyLayout = (LinearLayout) findViewById(R.id.bodyLayout);

View view = inflater.inflate(R.layout.home, null);

bodyLayout.addView(view);


위와 같은 구조에서 inflater로 sub.xml을 view로 생성하여 bodyLayout에 넣었습니다.

그런데 sub.xml의 크기가 fill로 차지않고 wrap으로 설정되네요..

크기를 강제로 350dp 등으로 넣으면 해당 크기를 차지하는데 fill_parent는 먹질 않네요 ㅠㅠ

왜 이런지 아시는분 도움  부탁드립니다.