我正在使用带有布局充气器的 gridview 来显示带有文本的图标,不同之处在于我必须在屏幕底部提供一个按钮。我的布局文件如下所示:
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/sdcard" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:verticalSpacing="10dp"
android:horizontalSpacing="10dp" android:numColumns="3"
android:stretchMode="columnWidth" android:gravity="center" android:background="#ffffff"/>
<RelativeLayout android:layout_width="match_parent"
android:layout_height="match_parent">
<Button android:text="submit" android:id="@+id/button"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:paddingTop="5dp">
</Button>
</RelativeLayout>
</merge>
当我在模拟器上测试时(根据真实设备的大小)。网格视图已正确填充,但是当我滚动到最后一行时,图像可见,但文本和按钮不妨碍视图。我希望文本也可见。我怎样才能做到这一点?