Beginner Q: Using AutoCompleteTextView with SimpleAdapter

Put your problem here if it does not fit any of the other categories.

Beginner Q: Using AutoCompleteTextView with SimpleAdapter

Postby ppmoore » Wed Apr 08, 2009 2:06 pm


I have an application that involves reading a text dictionary file with about 7000 entries, and allowing the user to choose one of these. My first approach was to allow the user to select one of these by using a AutoCompleteTextView together with ArrayAdapter<String>. This works, but is very slow (~10 seconds to update the word list each time the user enters a character to narrow down the choice).

I was wondering how to rework it so that I could use a database using a SimpleAdapter instead.
Is this the best way to do it? I've also seen several references to SimpleCursorAdapter and to SQLiteDatabase, but don't know which one to use.

I found this code fragmant consisting of an extended SimpleAdapter. ... apter.html

Unfortunately, this is not a complete worked out example. Could someone forward me a more complete example? I've found lots of code fragments, but no code that shows how to initialise the SimpleAdapter contents, or how it works together with the AutoCompleteTextView.

Many thanks,
Posts: 9
Joined: Thu Apr 02, 2009 5:16 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 23 guests