Android的指数滚动 [英] Android index scrolling

查看:150
本文介绍了Android的指数滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<一个href="http://developer.android.com/design/building-blocks/scrolling.html">http://developer.android.com/design/building-blocks/scrolling.html

我正在寻找解决方案,以执行第二部分(指数滚动),但我找不到任何例子来做到这一点。 是否有默认的A​​PI的解决方案?

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?

推荐答案

要实现指数的滚动,你必须调用 setFastScrollEnabled(真)您的ListView。此外,您的适配器必须实现<一个href="http://developer.android.com/reference/android/widget/SectionIndexer.html"><$c$c>SectionIndexer接口。

To implement index scrolling, you have to call setFastScrollEnabled(true) on your ListView. In addition, your adapter has to implement the SectionIndexer interface.

您可以在这里找到一个例子:<一href="http://spinettaro.blogspot.de/2011/11/android-snippet-$c$c-android-listview.html">http://spinettaro.blogspot.de/2011/11/android-snippet-$c$c-android-listview.html

You can find an example here: http://spinettaro.blogspot.de/2011/11/android-snippet-code-android-listview.html

这应该与所有的子类浏览 AbsListView

This should work with all Views that are a subclass of AbsListView.

这篇关于Android的指数滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆