I have a list of items which is fetched from the local database. Every item has property isNew
. I want to make visible TextView
with text "new" only for items which match isNew = true
. I solve this problem with two ways, and now I want to know which is best method.
Method 1:
I write a class MyViewBinder
which implements SimpleCursorAdapter.ViewBinder
and overrides public boolean setViewValue(view, cursor, columnIndex)
method with my logic next to that.
Method 2:
Create MySimpleCursorAdapter
which extends SimpleCursorAdapter
, overwrite getView
method and wrote logic there.
Now I'm working with the second method. Can anyone suggest me which is the best method or if there any other best methods.