Reputation: 4821
I'm using a custom adapter to retrieve data for a ListView. Initialize this data was not being fetched from database, but now it is. I was using a custom adapter retrieving data from server. Now the data is retrieved before filling the adapter.
Now, I have a doubt: Reading about CursorAdapters it seems pretty easy to implement, but I'm very comfortable with the actual implementation.
I have to say that data size will no exceed 10 items or so.... So it's not a memory problem.
So, in this situation... which are the advantages of using CursorAdapter?
Thanks in advance!
Upvotes: 1
Views: 595
Reputation: 16829
I think using the CursorAdapter will allow you to reload your list more easily. If any change is made to your content provider and the ContentObserver is notified, the onContentChanged() of your CursorAdapter is called so you may override it to do what you want or just use the default implementation. Concretely your list will be reloaded automatically when the data change.
Upvotes: 1