I have some cursor with data. I have TextView which visibility depends on some property of the item of cursor. I use SimpleCursorAdapter and override getView method. But I am actually not use from and to properties of SimpleCursorAdapter.
Is it better to change my adapter to CursorAdapter and override newView and bindView methods?
CursorAdapter is abstract and is to be extended. On the other hand, SimpleCursorAdapter is not abstract.
Notice that newView(Context context, Cursor cursor, ViewGroup parent) is abstract in CursorAdapter but implemented in SimpleCursorAdapter. This is because SimpleCursorAdapter has a specific mechanism to initiate views while CursorAdapter leaves it up to the developer.
Source : SimpleCursorAdapter and CursorAdapter
Added:
I have TextView which visibility depends on some property of the item of cursor.
For this you can check SimpleCursorAdapter.ViewBinder interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With