On Tue, Jun 1, 2010 at 7:27 AM, Oleksandr Stashuk
<[email protected]>wrote:

> Is there any way to speed this up?


Don't use such a large list. Try breaking up the one massive list into
something you can index. For example, instead of 1 list of ~2000 items, you
can have 26 lists of about 80 items indexed by the first character in each
address (more if you're using numbers, I guess).

Then when the user starts typing, get the first character they've typed and
get the corresponding list for that character (simple map lookup) and set
that much smaller list as the data source for the auto complete text view.

Disclaimer: I've not done anything with AutoCompleteTextViews so this may or
may not be actually possible =P

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to