ヘッダーとフッターをすべてのアクティビティと同じに保ちたいのですが、ヘッダーとフッターの間でコンテンツを変更するだけです。下の画像は、そのようなことを行うために必要な方法を示しています。おかげで助けてください。



ヘッダーとフッターをすべてのアクティビティと同じに保ちたいのですが、ヘッダーとフッターの間でコンテンツを変更するだけです。下の画像は、そのようなことを行うために必要な方法を示しています。おかげで助けてください。



以下のように、すべてのアクティビティに単一のレイアウトを使用するだけです。
 // Header Activity..
   <RelativeLayout>
        // items in header activity
   </RelativeLayout>
 // Footer Activity..
   <RelativeLayout>
        // items in footer activity
   </RelativeLayout>
// In all activity
    <include android:id=”@+id/header”
     android:layout_width=”fill_parent”
     android:layout_height=”fill_parent”
     layout=”@layout/header_layout”/>
     <RelativeLayout
        android:id="@+id/middle_layout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@+id/header_layout"
        >
         // middle layout
        </RelativeLayout>
    <include android:id=”@+id/footer”
     android:layout_width=”fill_parent”
     android:layout_height=”fill_parent”
     layout=”@layout/footer_layout”/>