0
我想添加一個空的視圖,高度爲30dp低於我的gridview但不幸的是,我無法看到預期的結果。 唯一可見的是gridview。查看未被插入
如何顯示空的查看全部內容gridview都呈現?
這裏是我的代碼:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary">
<GridView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:numColumns="3"
android:background="@color/colorAccent"
/>
<View
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@id/list"
android:background="@color/colorPrimaryDark"/>
</RelativeLayout>
還是......只有GridView控件是可見的。 –
您是否複製了整個佈局?注意根應該是一個垂直方向的LinearLayout – Matteo
我做了同樣的...仍然是這樣。 :( –