2013-01-23 53 views

回答

1

试试这个:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context=".Form" > 

    <RelativeLayout 
     android:id="@+id/header" 
     android:layout_width="match_parent" 
     android:layout_height="50dp" 
     android:layout_alignParentTop="true" 
     android:background="#cccccc" > 
    </RelativeLayout> 

    <FrameLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_above="@+id/footer" 
     android:layout_below="@+id/header" 
     android:background="#ff0000" > 
    </FrameLayout> 

    <RelativeLayout 
     android:id="@+id/footer" 
     android:layout_width="match_parent" 
     android:layout_height="50dp" 
     android:layout_alignParentBottom="true" 
     android:background="#cccccc" > 
    </RelativeLayout> 

</RelativeLayout> 

感谢。

+0

它也没有帮助。界面看起来如此:[Imgur](http://i.imgur.com/cFUD9ll)而不是[Imgur](http://i.imgur.com/5Qe0xyt)。 – sttooo

+0

@sttooo看到我编辑的答案。那现在会很好用。 –

+0

我发现问题出现在应用程序的另一部分,但您的解决方案也可以正常工作。谢谢。 – sttooo