I have a background image in a gridview and I want to disable the scroll of the gridview, so that it doesnt scroll the image. How would I go about doing this?
Asked
Active
Viewed 4.3k times
5
-
1Have u tried `setEnabled(false)` – Developer Apr 30 '11 at 05:05
-
yes i have tried but it doesnt have any effect – user687022 Apr 30 '11 at 05:15
2 Answers
6
use gridview.setVerticalScrollBarEnabled(false)
to disable vertical scroll bar.

CoolBeans
- 20,654
- 10
- 86
- 101

user732134
- 127
- 1
-
37always amazed to see that a 2-line question is already too long to read for some. – njzk2 Dec 02 '11 at 14:21
-
3it dint work in my case :( cud i be missin something ? – Rat-a-tat-a-tat Ratatouille Mar 31 '14 at 10:07
-
3
0
-
gridview.setOnTouchListener(new OnTouchListener(){ @Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_MOVE){ return true; } return false; } }); – Makvin Jan 05 '18 at 11:33