Android: making a custom ListView independent of adapters ?
Posted
by wei
on Stack Overflow
See other posts from Stack Overflow
or by wei
Published on 2010-05-22T03:29:00Z
Indexed on
2010/05/22
3:40 UTC
Read the original article
Hit count: 259
android
I am adding a local database as a cache to a remote web service in my android application to answer queries. I used ArrayAdapters before for list views to display the results from the web service. Now with a database cache, the result could be either a Cursor(from database) or a List(from web), which means the adapter can be CursorAdapter or ArrayAdapter too. Creating two adapters for one query doesn't seem to be a good idea. So I am wondering what would be the best way to refactor my current code to add this database feature?
Thanks,
© Stack Overflow or respective owner