How to implement scrollbar with thumb for fast scrolling

前端 未结 2 1604
Happy的楠姐
Happy的楠姐 2021-02-13 12:32

I need to implement a screen having around 1000 thumbnails. This screen should support gesture based scrolling as well as fast scrolling using a scrollbar with thumb. So if user

相关标签:
2条回答
  • 2021-02-13 13:10

    See this answer. It gives details about how to customize the look of the fast scroll thumb on API level >= 11.

    0 讨论(0)
  • 2021-02-13 13:23

    ListView thumb support:

    ListView vList = ...;
    vList.setFastScrollEnabled(true);
    

    GridView thumb support:

    GridView vGrid = ...;
    vGrid .setFastScrollEnabled(true);
    

    Your can also divide content into sections. In order to to that the adapter must implement following interface:

    android.widget.SectionIndexer
    
    0 讨论(0)
提交回复
热议问题