Hello there, 

I am trying to get my head around CursorLoaders and would appreciate some 
help. 

I have a ListFragment which loads list data in a background thread via a 
CursorLoader/implementing the LoaderManager.LoaderCallbacks<Cursor> 
interfaces. The data in the list comes from a database via a 
ContentProvider and the ContentProvider manages calls to notifyChange() 
when the data is changed.

I read on the Android Developers web site that when the data in the list is 
changed, the cursor becomes invalid and onLoaderReset() is called. Some 
functions other than the onLoadFinished() in my ListFragment use the cursor 
and also I have implemented a class derived from SimpleCursorAdapter which 
uses the cursor in getView().

If the cursor can be invalidated when the list data changes (which could 
happen in a separate service), should I be checking that the cursor is not 
null/invalid any time I use it in my class derived from SimpleCursorAdapter 
and my ListFragment? or is it safe to use?.

Thank you for your help.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to