145

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?

DonGru
  • 12,863
  • 8
  • 42
  • 55
Android-Droid
  • 13,649
  • 37
  • 107
  • 184

5 Answers5

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

Ria
  • 9,576
  • 3
  • 29
  • 55
ihrupin
  • 6,852
  • 2
  • 28
  • 47
  • 1
    Thanks a lot.I was expectiogn something like setScrollBarEnabled or something like that. – Android-Droid Aug 15 '11 at 06:38
  • 47
    For 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.

Sergey Shustikov
  • 13,329
  • 9
  • 57
  • 110
7

This is the property you should use on your ListView. All the best.

android:scrollbars="none"

Diogo Correia
  • 43
  • 2
  • 6
Soumen Das
  • 1,084
  • 13
  • 11
1

Also make sure that fast scrolling disabled:

listView.setFastScrollEnabled(false);

Thanks, Rahul

Rahul
  • 689
  • 2
  • 15
  • 30
1

Usually using both of them

android:divider="@null"
android:dividerHeight="0dp"
Sam
  • 5,467
  • 4
  • 31
  • 37