联系查看造型在Android造型、Android

2023-09-07 09:47:00 作者:美丽旳对白

好了,现在我在我的Andr​​oid应用程序的视图显示是通过Web服务检索为我们的代理商联系人列表。

Ok, currently I have a view in my android app that displays a list of contacts for our agents that is retrieved via a web service.

我建立了一个简单的数组适配器,我的联系对象绑定到listactivity,只是使用contactrow.xml模板,从1到1000个联系人的任何位置显示。

I have built a simple array adapter that binds my contact objects to the listactivity and just uses a contactrow.xml template to display anywhere from 1 to 1000 contacts.

这工作正常,但为的缺少的最好。我要复制的联系人滚动在Android接触的应用程序的方式。是否有办法有ABC的索引到右侧,并帮助最终用户浏览这个联系人名单,他们希望以同样的方式?

This works fine but is lacking at best. I want to replicate the way that contacts are scrolled in the android contact app. Is there is way to have the ABC's indexed to the right and help the end user navigate this contact list the same way they would expect?

是否CursorAdapter的帮助下做到这一点?什么是最好的方法呢?

Does the CursorAdapter help accomplish this? What is the best approach?

推荐答案

您要查找的内容是的 AlphabetIndexer 类。我没有用往心里去,但这里是一个教程,可以帮助你:

What you're looking for is the AlphabetIndexer class. I've not used it personally, but here is a tutorial that may help you:

的http://www.anddev.org/tutusing_alphabetindexer_for_fastscrolling_listview-t10282.html