I recently wrote a StackOverflow Documentation example, illustrating how to populate a ListView
from a database using a SimpleCursorAdapter
.
It got rejected by with the following motivation:
Nobody should be using CursorAdapters anymore. They were deprecated for a reason!
I was unaware that cursor adapters were deprecated (and for what reason), so I Googled it. All that turned up were a bunch of posts asking roughly the same question I am asking right now, and the standard answer seemed to be "Only one of the constructors are deprecated, not the entire CursorAdapter class!"
So which way is it? Was my contribution rightfully rejected or not?
How should a ListView
be populated, if not by a SimpleCursorAdapter
? I know there are things like CursorLoader
, but for a simple task like displaying some data in a ListView
it seems like an unnecessary hassle to have to deal with content providers and stuff, when the same thing can be accomplished with an AsyncTask
and a SimpleCursorAdapter
...