【发布时间】:2014-02-11 10:47:38
【问题描述】:
我正在尝试将 GridView 放在 android 的 ScrollView 中。 当我把 GridView 不工作的时候。
这是布局。
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scroll_home"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/layout_home"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/programacao_grid"
android:numColumns="auto_fit"
android:gravity="center"
android:columnWidth="50dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/calendario_programacao"
>
</GridView>
</RelativeLayout>
</ScrollView>
经过多次搜索找到了答案
【问题讨论】:
-
将gridview移出scrollview
-
但我需要 GridView 留在 ScrollView 内