Home » Android » Android hide listview scrollbar?

Android hide listview scrollbar?

Posted by: admin March 10, 2020 Leave a comment

Questions:

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?

How to&Answers:

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

Answer:

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.

Answer:

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

android:scrollbars="none"

Answer:

Also make sure that fast scrolling disabled:

listView.setFastScrollEnabled(false);

Thanks,
Rahul

Answer:

Usually using both of them

android:divider="@null"
android:dividerHeight="0dp"