Building an AutoCompleteTextView for a custom data structure

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

Building an AutoCompleteTextView for a custom data structure

Postby teastburn » Sat May 03, 2008 10:52 pm

Hi All,

I am building an application that (among many other things) will (hopefully) auto-complete single words and bigrams that users enter in an AutoCompleteTextView from a custom-built dictionary with a Patrica Trie data structure. As of now, my application searches the dictionary and returns autocompletions just fine, however I am having problems updating the auto-completions.
I began with an ArrayAdapter and just reset the adapter everytime I got new completions. However, that happens multiple times per second (as the user types), and somewhere in that mayhem the completions or something (I'm not even sure what) get overwritten and somehow I get a NullPointerException within the Android code (I can't see it).

So, my question is, how can I build an autocomplete that updates seamlessly multiple times per second without using a content provider or a database? Ideally the implementation and functionality will be similar to the (sorry it wont let me post a link) the API Demos. Can I build my own extension of a Cursor and use that with my own CursorAdapter? And how do I do that?
Any help is GREATLY APPRECIATED, and if more info is needed I am more than happy to supply it. Any links, suggestions, ideas, confusions... THANKS in advance!!

Once Poster
Once Poster
Posts: 1
Joined: Sat May 03, 2008 10:29 pm


Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot], MSNbot Media and 18 guests