Android hide listview scrollbar?

后端 未结 5 1382
失恋的感觉
失恋的感觉 2020-12-12 23:25

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 i

相关标签:
5条回答
  • 2020-12-12 23:35

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

    android:scrollbars="none"

    0 讨论(0)
  • 2020-12-12 23:39

    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.

    0 讨论(0)
  • 2020-12-12 23:41

    Also make sure that fast scrolling disabled:

    listView.setFastScrollEnabled(false);
    

    Thanks, Rahul

    0 讨论(0)
  • 2020-12-12 23:50

    Usually using both of them

    android:divider="@null"
    android:dividerHeight="0dp"
    
    0 讨论(0)
  • 2020-12-12 23:56

    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

    0 讨论(0)
提交回复
热议问题