<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:horizontalSpacing="0dp"
android:numColumns="2"
android:stretchMode="columnWidth"
android:verticalSpacing="0dp" />
</FrameLayout>如何在这个布局中添加滚动视图我必须在这个布局中添加更多的图片,但它不会显示超过6个图像。
发布于 2013-09-12 08:43:04
您可以降低gridView高度和gridView将滚动。
发布于 2013-09-12 08:41:17
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<GridView
android:id="@+id/gridview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:horizontalSpacing="0dp"
android:numColumns="2"
android:stretchMode="columnWidth"
android:verticalSpacing="0dp" />
</ScrollView>
</FrameLayout>尝尝这个。
发布于 2013-09-12 08:39:04
有点不清楚的问题,但我想你想要这个?
<FrameLayout>
<ScrollView>
<GridView>
</GridView>
</ScrollView>
</FrameLayout>https://stackoverflow.com/questions/18758733
复制相似问题