I am new to Android and am trying to get my header round the SimpleCursorAdapter
and CursorLoader
classes. From my understanding, all of the examples that I have seen use these two classes to load data into a ListView
in a background thread (to not block the UI).
I am OK with this and have used this general approach with my own list of items, however I now want to be able to click on an item in the list and get the full information for the item. Is it usual practice to use SimpleCursorAdapter
and CursorLoader
to retrieve the details for a single item? or are they just meant for lists?.
Thanks.
They are not meant for lists only. You can - and should - use them in detail views (activities) as well.
I've sketched a possible way to do so on my blog: http://www.grokkingandroid.com/using-loaders-in-android/