Dynamic data for an adapter connected to EditText

Is there a way to connect a dynamic adapter to an EditText?

What I want is when a key is pressed on EditText, my code searches in (some) user repository and provides suggestions (instead of a static Xml list or array). This store is not a database; I think the CursorAdapter is for database results only. Sample code snippets are welcome.

+2
android android-edittext autocomplete adapter
source share
1 answer

I found a solution and sent the answer to this question .

Write a custom SimpleCursorAdapter . Override the runQueryOnBackgroundThread() method and return a new MatrixCursor based on the input constraint. Associate this adapter with the autocomplete edit box.

I got a hint for this answer @ http://thinkandroid.wordpress.com/2010/01/11/custom-cursoradapters/

+1
source share

All Articles