我想要的是讓gridview填充整個屏幕。當你向下滾動時,最後會出現一個帶2個按鈕的佈局。我一直在閱讀,並不知道如何得到它。我可以修復它在屏幕的頂部和底部(通過gridview)。當gridview被填充時,甚至會出現按鈕不會顯示的佈局。Android:gridview底部的佈局(在它的結尾)
我一直玩重量,對齊等,但無法找到什麼是錯的。繼承人的XML:下面的GridView
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/fondo">
<GridView android:layout_width="fill_parent"
android:id="@+id/gridView1"
android:layout_height="wrap_content"
android:numColumns="2"
android:listSelector="#00000000">
</GridView>
<LinearLayout android:id="@+id/linearLayout"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:orientation="horizontal"
android:layout_below="@id/gridView1">
<ImageView android:id="@+id/botonAtras"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="1"
android:onClick="onBotonAtrasClick">
</ImageView>
<ImageView android:id="@+id/botonAdelante"
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_weight="1"
android:onClick="onBotonAdelanteClick">
</ImageView>
</LinearLayout>
</RelativeLayout>
查看類似的問題:http://stackoverflow.com/questions/8876596/need-to-create-footer-for-gridview-in-android。不同的是,另一個問題是關於一個按鈕,這是關於佈局。 –