如何实现滚动条拇指的快速滚动 [英] How to implement scrollbar with thumb for fast scrolling
问题描述
我要实现具有约1000缩略图画面。本屏幕应该使用带有拇指滚动条支持基于手势的滚动和快速滚动。因此,如果用户想从第1页转到页100,他可以只需将拇指和到达那里。
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 want to move from page 1 to page 100 he can just drag the thumb and reach there.
但没有这样的控制机器人。有搜索栏,但它的外观和感觉是不是像我想要的。我也想轻弹并可以使用horizontalscrollbar继承刷卡功能。所以,我想补充的水平scroolbar的功能以及搜索栏在我的应用程序。
But there is no such control in Android. There is seek bar but its look and feel is not similar to what I want. I also want to flick and swipe functionality which can be inherited using horizontalscrollbar. So i want to add functionality of horizontal scroolbar as well as of seekbar in my application.
不过,我面临着一些问题,同步与刷或轻弹事件,并搜索栏拇指外观拇指位置和感觉需要进行修改。
But I am facing some issue to sync thumb position with swipe or flick event and also the seekbar thumb look and feel need to be modified.
请推荐一些线索。
推荐答案
ListView的拇指支持:
ListView thumb support:
ListView vList = ...;
vList.setFastScrollEnabled(true);
GridView的拇指支持:
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
这篇关于如何实现滚动条拇指的快速滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!