2012-04-16 32 views

回答

0

您的問題是可能重複:

how to get Save & Cancel button like in Contacts?

這是一個頁腳視圖: 你需要做這樣的事情:

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


    <LinearLayout android:id="@+id/linearLayout1" 
     android:layout_width="fill_parent" android:layout_height="fill_parent" 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     android:orientation="vertical" android:background="#ffffff"> 
     <RelativeLayout 
      android:layout_width="fill_parent" android:layout_height="50dp"> 
      <Button "></Button> 
     </RelativeLayout> 

     <ScrollView android:layout_width="fill_parent" 
      android:layout_height="wrap_content" android:layout_weight="1"> 
      <LinearLayout android:id="@+id/linearLayout1" 
       android:layout_width="fill_parent" android:layout_height="wrap_content" 
       android:orientation="vertical" android:background="#ffffff"> 
       <RelativeLayout android:gravity="bottom" 
        android:paddingTop="40dp" android:layout_width="fill_parent" 
        android:layout_height="fill_parent" 
        android:layout_alignParentBottom="true" 
        android:layout_alignParentLeft="true" android:background="#ffffff" 
        android:paddingBottom="55dp"> 

        <Button ></Button> 

        <Button ></Button> 

        <Button></Button> 


        <Button></Button> 


       </RelativeLayout> 
      </LinearLayout> 

     </ScrollView> 
<!--for bottom bar --> 
     <RelativeLayout android:layout_height="50dp" 
      android:gravity="center" android:layout_width="match_parent" 
      android:id="@+id/linearLayout2" android:background="#ffffff"> 
      <Button ></Button> 
      <Button ></Button> 
      <Button ></Button> 
     </RelativeLayout> 

</LinearLayout>