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
我做了同样的...仍然是这样。 :( –