0
頁腳棍這是我的活動版面內容:如何使標題 - 內容 - 頁腳佈局的Android與底部
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="header"
android:layout_width="fill_parent"
android:layout_height="50">
<TextView
android:layout_width="fill_parent "
android:layout_height="wrap_content"
android:text="Header"
android:textSize="40dp" />
</RelativeLayout>
<RelativeLayout
android:id="main-content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="Content" />
</RelativeLayout>
<RelativeLayout
android:id="footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Footer"
android:textSize="40dp" />
</RelativeLayout>
</RelativeLayout>
頁腳已經堅持到了谷底,但內容被貼到頂部而不是在「標題」之後。我想過使用「線性佈局」,但它沒有android:layout_alignParentBottom =「true」。我必須做什麼?