Is there a way to hide scrollbar in ListView
. I know it's possible for ScrollView
but can't find a way for ListView
scrollbar. Any ideas?
Asked
Active
Viewed 8.9k times
145
![](../../users/profiles/415347.webp)
DonGru
- 12,863
- 8
- 42
- 55
![](../../users/profiles/917586.webp)
Android-Droid
- 13,649
- 37
- 107
- 184
5 Answers
359
Try to type this in layout xml file
android:scrollbars="none"
Tutorial is here.
http://developer.android.com/reference/android/view/View.html#attr_android:scrollbars
Hope, it helps you
-
1Thanks a lot.I was expectiogn something like setScrollBarEnabled or something like that. – Android-Droid Aug 15 '11 at 06:38
-
47For future reference: setVertical/HorizontalScrollBarEnabled/Disabled() – slezica Sep 29 '11 at 19:38
-
Hi all, I want to hide scrollbar in listview. here your mention line for getting this work but I didn't catchup where can I write this line, I am working on xamarn forms. – Deepak Oct 03 '17 at 05:03
25
If you want to disable \ enable scrollbars programmatically you need use
View.setVericalScrollbarEnabled(boolean) - disable \ enable vertical scrollbars.
View.setHorizontalScrollBarEnabled(boolean) - disable \ enable horizontal scrollbars.
![](../../users/profiles/4969827.webp)
Sergey Shustikov
- 13,329
- 9
- 57
- 110
7
This is the property you should use on your ListView
. All the best.
android:scrollbars="none"
![](../../users/profiles/5758191.webp)
Diogo Correia
- 43
- 2
- 6
![](../../users/profiles/5645541.webp)
Soumen Das
- 1,084
- 13
- 11
1
Also make sure that fast scrolling disabled:
listView.setFastScrollEnabled(false);
Thanks, Rahul
![](../../users/profiles/315140.webp)
Rahul
- 689
- 2
- 15
- 30