What's the proper way to implement a custom SimpleCursorAdapter?

80 views Asked by At

I need the same functionality of a SimpleCursorAdapter but with a custom bindView() method. That's practically the only difference I would have in my custom adapter, and I want to have the rest of the functionallity of the SimpleCursorAdapter to stay as is.

Is it enough to just extend CursorAdapter? More specifically looking at the source of SimpleCursorAdapter one of the constructors is commented as:

@deprecated This option is discouraged, as it results in Cursor queries being performed on the application's UI thread and thus can cause poor responsiveness or even Application Not Responding errors.

How do I make sure my custom adapter doesn't run on the activity thread? Do I need any of the other methods of the SimpleCursorAdapter such as swapCursor()?

0

There are 0 answers