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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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
回答2:
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.
回答3:
This is the property you should use on your ListView
. All the best.
android:scrollbars="none"
回答4:
Also make sure that fast scrolling disabled:
listView.setFastScrollEnabled(false);
Thanks, Rahul
回答5:
Usually using both of them
android:divider="@null"
android:dividerHeight="0dp"