Usage CursorLoader without ContentProvider

Posted by sealskej on Stack Overflow See other posts from Stack Overflow or by sealskej
Published on 2011-08-24T21:26:27Z Indexed on 2012/11/15 17:00 UTC
Read the original article Hit count: 237

Android SDK documentation says that startManagingCursor() method is depracated:

This method is deprecated. Use the new CursorLoader class with LoaderManager instead; this is also available on older platforms through the Android compatibility package. This method allows the activity to take care of managing the given Cursor's lifecycle for you based on the activity's lifecycle. That is, when the activity is stopped it will automatically call deactivate() on the given Cursor, and when it is later restarted it will call requery() for you. When the activity is destroyed, all managed Cursors will be closed automatically. If you are targeting HONEYCOMB or later, consider instead using LoaderManager instead, available via getLoaderManager()

So I would like to use CursorLoader. But how can I use it with custom CursorAdapter and without ContentProvider, when I needs URI in constructor of CursorLoader?

© Stack Overflow or respective owner

Related posts about android

Related posts about cursor