2011-09-15 60 views
0
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

    <RelativeLayout android:id="@+id/header" 
    android:layout_width="fill_parent" 
    android:layout_height="50dip" 
    android:background="@drawable/activity_header_background"> 

     <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:textSize="17dip" 
     android:textStyle="bold" 
     android:layout_centerVertical="true" 
     android:layout_centerHorizontal="true" 
     android:text="@string/help_faq_menu"> 
     </TextView> 
    </RelativeLayout> 

    <FrameLayout android:id="@+id/body" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:layout_below="@+id/faq_header"> 

     <WebView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" /> 

     <ProgressBar 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     style="?android:attr/progressBarStyle" 
     android:layout_gravity="center_horizontal|center_vertical" 
     android:visibility="gone"> 
     </ProgressBar> 
    </FrameLayout> 

    <RelativeLayout android:id="@+id/footer" 
    android:layout_width="fill_parent" 
    android:layout_height="50dip" 
    android:background="@drawable/activity_footer_background" 
    android:layout_alignParentBottom="true"> 

     <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_marginLeft="5dip" 
     android:layout_alignParentLeft="true" 
     android:layout_centerVertical="true" 
     android:background="@drawable/button_drawable_shape" 
     android:text="@string/done"> 
     </Button> 

     <Button 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_centerInParent="true" 
     android:layout_centerVertical="true" 
     android:background="@drawable/button_drawable_shape" 
     android:text="@string/contact_support"> 
     </Button> 

     <ImageButton 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:src="@drawable/refresh" 
     android:layout_marginRight="5dip" 
     android:layout_alignParentRight="true" 
     android:layout_centerVertical="true" 
     android:background="@null"> 
     </ImageButton> 
    </RelativeLayout> 
</RelativeLayout> 
+0

問題是因爲「標題」在頂部然後來到相對佈局「身體」,然後「頁腳」。除了相對佈局「footer」隱藏底部「body」部分的50dip之外,evrything沒有問題。 –

+0

android:layout_below =「@ + id/body」在頁腳中給出Relativelayout – Abhi

+0

@Abhi ...感謝您的建議。 android:layout_below「footer」沒有解決這個問題,但android:layout_above =「@ + id/footer」對於「body」確實運行良好。 –

回答

0
android:layout_below="@+id/body" give in footer Relativelayout 

android:layout_above="@+id/footer"車身佈局

和身體是FrameLayout裏,你爲什麼不使用RelativeLayout的替代和修復多少你想要的高度。