Here it says that SimpleCursorAdapter
's API level 1 constructor is deprecated and the use of LoaderManager
and CursorLoader
is recommended.
But delving into the LoaderManager
and CursorLoader
's use I found this example where inside an inner class that extends a ListFragment
(an extension of Fragment itself I suppose) we create a CursorLoader
. Everything seems ok, except for the fact that CursorLoader
takes a Uri
as an argument. So this implies that I need to create a ContentProvider
to get access to my database.
I must confess it looks like an overkill to have to go through all of this just to create a simple ListView
with items coming from a database. Specially if I have no intention of making my database data available to other apps, and the main purpose of a content provider is to do that.
So is it really worth it?
Especially in cases like mine where the content to be fetched is likely going to be small. I'm seriously considering doing it the old way, what do you say?