I've got a ListActivity that displays a list of items from a database
using a CursorAdapter, which initially contains all items in the table.
I also provide an EditText view where the user can enter search text,
and as characters are entered, I requery the database using a "LIKE" or
"MATCH" where clause to filter the results (IOW, what lots of apps do
when searching).
Currently, I do this in an AsyncTask by creating a new Cursor from the
query, creating a new instance of my CursorAdapter class, and then
calling list.setAdapter from the UI thread when the task completes. This
is all working, but is there a more elegant way of effectively
requerying the database with a new WHERE clause from withing the
existing adapter/cursor and avoiding having to create new object
instances each time? Any examples of this technique?
Doug Gordon
GHCS Software
--
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