有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (1) 个答案

  1. # 1 楼答案

    只需对所有活动使用单一布局,如下所示

     // 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”/>