Hi, please please please just take the CursorLoader implementation in the support library and modify it to get its cursors from your SQLiteDatabase rather than the content resolver. Unfortunately there are a lot of tricky things you need to do in the AsyncTaskLoader subclass to get it to work correctly, and CursorLoader implements these correctly. Just use its code and replace the one line where it queries for the cursor.
On Mon, Aug 1, 2011 at 11:05 PM, Nikolay Elenkov <[email protected]>wrote: > On Tue, Aug 2, 2011 at 2:35 PM, Nikolay Elenkov > <[email protected]> wrote: > > On Tue, Aug 2, 2011 at 2:04 PM, julius <[email protected]> wrote: > > > > > >> Anyhow, after deliverResult I'm guessing onLoadFinished runs. At this > point, > >> now the Cursor is refreshed, do we just need to use notifyDatasetChanged > on > >> our Adapter? > > > > If you have a CursorAdapter, you need to call swapCursor() first. > > (*not* changeCursor()). > > > > Actually, CursorAdapter.swapCursor() calls it internally, so just > swapCursor() is enough. > > -- > 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 > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

