How to implement scrollbar with thumb for fast scrolling

前端 未结 2 1596
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: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
    

提交回复
热议问题