Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement scrollbar with thumb for fast scrolling

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.

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.

Please suggest some clue.

like image 948
Himanshu Avatar asked Jun 02 '10 11:06

Himanshu


People also ask

How do I enable fast scrolling?

Fast Scroll is a handy extension to increase your browser's scrolling speed. Easy to use To activate the increased speed, hold the Alt key while scrolling. Customization You can change your preferred speed any time by clicking the extension icon. Your preferences are saved and synchronized to your Chrome profile.

What is scrollbar track and thumb?

The scrollbar-color CSS property sets the color of the scrollbar track and thumb. The track refers to the background of the scrollbar, which is generally fixed regardless of the scrolling position. The thumb refers to the moving part of the scrollbar, which usually floats on top of the track.

How do I customize my browser scroll bar?

Scrollbar Selectors For webkit browsers, you can use the following pseudo elements to customize the browser's scrollbar: ::-webkit-scrollbar the scrollbar. ::-webkit-scrollbar-button the buttons on the scrollbar (arrows pointing upwards and downwards). ::-webkit-scrollbar-thumb the draggable scrolling handle.

How do you measure thumb scrollbar height?

The thumb (I've heard people call it a scrubber) size should be the size of the viewport (in your example 200px) divided by the size of the content (600px). So, your thumb should take up 1/3rd the available height. The available height is the size of the scroll bar minus the arrows.


1 Answers

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
like image 99
plugmind Avatar answered Sep 24 '22 18:09

plugmind