问题是我的代码中有一个 setEnabled。对不起。我已经解决了这个问题
我希望我的 height = 70dp 的 gridview 可以垂直滚动。
<GridView
android:id="@+id/list_label"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:numColumns="2"
/>
谁能帮我解决这个问题?
最佳答案
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridView1"
android:numColumns="2"
android:gravity="center"
android:columnWidth="70dp"
android:stretchMode="columnWidth"
android:layout_width="fill_parent"
android:scrollbars="horizontal"
android:layout_height="fill_parent" >
</GridView>
关于android - 如何向 gridview 添加垂直滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27863064/