How to always show scrollbar

前端 未结 14 607
走了就别回头了
走了就别回头了 2020-11-30 18:59

The scrollbar in my scrollview is only visible when I start scrolling. How can I always show it?

相关标签:
14条回答
  • 2020-11-30 19:41

    Don't forget to add android:scrollbars="vertical" along with android:fadeScrollbars="false" or it won't show at all in some cases.

    0 讨论(0)
  • 2020-11-30 19:41

    Try android:scrollbarAlwaysDrawVerticalTrack="true" for vertical. and Try android:scrollbarAlwaysDrawHorizontalTrack="true" for horizontal

    0 讨论(0)
  • 2020-11-30 19:43

    Since neither of the above worked for me, here's what did: android:scrollbarDefaultDelayBeforeFade="500000"

    0 讨论(0)
  • 2020-11-30 19:43

    These two together worked for me:

    android:scrollbarFadeDuration="0"
    android:scrollbarAlwaysDrawVerticalTrack="true"
    
    0 讨论(0)
  • 2020-11-30 19:46

    Try this as the above suggestions didn't work for me when I wanted to do this for a TextView:

    TextView.setScrollbarFadingEnabled(false);
    

    Good Luck.

    0 讨论(0)
  • 2020-11-30 19:46

    android:scrollbarFadeDuration="0" sometimes does not work after I exit from the apps and start again. So I add gallery.setScrollbarFadingEnabled(false); to the activity and it works!

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