http://developer.android.com/design/building-blocks/scrolling.html
I'm looking for solution to perform the second part ("Index Scrolling"), but I can't find any examples to do that. Is there a solution in default-API?
In Android, a ScrollView is a view group that is used to make vertically scrollable views. A scroll view contains a single direct child only. In order to place multiple views in the scroll view, one needs to make a view group(like LinearLayout) as a direct child and then we can define many views inside it.
To add multiple views within the scroll view, make the direct child you add a view group, for example LinearLayout , and place additional views within that LinearLayout. Scroll view supports vertical scrolling only. For horizontal scrolling, use HorizontalScrollView instead.
Display scrollable content in your Android app using CardView and ScrollView layouts. Card-based layouts are a great way of content in a stylistically consistent manner. For example, you could use card-based layouts to show the images in an image gallery or previews of news articles.
To implement index scrolling, you have to call setFastScrollEnabled(true)
on your ListView. In addition, your adapter has to implement the SectionIndexer
interface.
You can find an example here: http://spinettaro.blogspot.de/2011/11/android-snippet-code-android-listview.html
This should work with all Views that are a subclass of AbsListView
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With