Adding from 2 databases to a listView row
Can I add data 2 from different databases into each row of a ListView in Android?
I have a vendor app and I want to add data from one sta开发者_运维技巧ndard items list table and one daily table to the list view.
Yes, but you won't be able to use the CursorAdapter
s implementation easily. I would put all data you need inside an array, and then you can write your own BaseAdapter
or use an implementation of ArrayAdapter
.
You might also want to checkout Commonswares CWAC-MergeAdapter maybe it is of use for your problem. It is meant to provide you an easy way of handling multiple data sources and views for display in one ListView
.
精彩评论