简体   繁体   中英

Contact View Styling on Android

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.

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.

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM