SimpleCursorAdapter vs CursorAdapter?

I have some data cursor. I have a TextView whose visibility depends on some property of the cursor element. I am using SimpleCursorAdapter and overriding the getView method. But I do not actually use the properties of SimpleCursorAdapter. Is it better to change the adapter to a CursorAdapter and override the newView and bindView methods?

+7
source share
1 answer

CursorAdapter is abstract and needs to be extended. On the other hand, SimpleCursorAdapter is not abstract.

Please note that newView (context context, cursor, parent of ViewGroup) is abstract in CursorAdapter, but implemented in SimpleCursorAdapter. This is because the SimpleCursorAdapter has a special mechanism for running views, while the CursorAdapter leaves it to the developer.

Source: SimpleCursorAdapter and CursorAdapter

Added:

I have TextView which visibility depends on some property of the item of cursor.

To do this, you can check the SimpleCursorAdapter.ViewBinder interface.

+7
source