Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do 'fastScrollEnabled' like ListView in ScrollView?

I need fast scroll thumb in ScrollView (which we can scroll by dragging the thumb, like in fastScrollEnabled ListView). Problem detail: The list are rows composed with different TypeFace and alignment.

Row 1:
TextView1 (TypeFace:A & LeftAligned)
TextView2 (TypeFace:B & RightAligned)

Row 2:
TextView3 (TypeFace:A & LeftAligned)
TextView4 (TypeFace:B & RightAligned)
.
.
.

Second requirement: I need to be alerted when the view scrolled, including new scroll position - which is implemented by overriding onScrollChanged method of the ScrollView.

So I use ScrollView cause I though its impossible to implement using ListView.

Suggestion?

like image 860
yuwono95 Avatar asked Mar 02 '11 07:03

yuwono95


1 Answers

ScrollView doesn't support fast scroll (unless you do it yourself of course.) However, what you are describing can be achieved with ListView. ListView lets you use several types of views for the list items.

like image 115
Romain Guy Avatar answered Nov 07 '22 03:11

Romain Guy