我试着把GridView放在安卓系统的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>经过多次搜索,我找到了答案,如下所示
https://stackoverflow.com/questions/21264951
复制相似问题