Reputation: 2555
The problem was that I had a setEnabled in my code. Sorry. I already fix this
I want that my gridview with height = 70dp is scrollable vertically.
<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"
/>
Anybody can help me with this?
Upvotes: 3
Views: 20120
Reputation: 3
This will work. Use this on .java file.
gridView = (GridView)findViewById(R.id.list_label);
ViewCompat.setNestedScrollingEnabled(gridView,true);
Upvotes: 0
Reputation: 11
gridView = (GridView)findViewById(R.id.rvProduit1);
ViewCompat.setNestedScrollingEnabled(gridView,true);
Upvotes: 1
Reputation: 21551
Try to use:
android:scrollbars="vertical"
For vertical scrollbar
Upvotes: 2
Reputation: 64
<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>
Upvotes: 5