3

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?

rafaelasguerra
  • 2,603
  • 4
  • 21
  • 53

4 Answers4

4
<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>
Faraz Baig
  • 56
  • 2
2

Try to use:

android:scrollbars="vertical"

For vertical scrollbar

Shailendra Madda
  • 19,210
  • 15
  • 86
  • 129
1
gridView = (GridView)findViewById(R.id.rvProduit1); 
ViewCompat.setNestedScrollingEnabled(gridView,true);
Zoe stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
0

Add

 android:scrollbars="horizontal"
Arjun
  • 34
  • 1
  • 8