开发者

Adding from 2 databases to a listView row

开发者 https://www.devze.com 2023-02-07 19:28 出处:网络
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 t

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 CursorAdapters 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号