开发者

is there a way to use cursor adapter to display a list whose items are backed by sqlite

开发者 https://www.devze.com 2023-03-27 20:37 出处:网络
I have a list of items that I wish to map onto a ListView, but the individual fields of those items may or may not be backed by sqlite. If the item is not backed by sqlite, I\'d like to just display s

I have a list of items that I wish to map onto a ListView, but the individual fields of those items may or may not be backed by sqlite. If the item is not backed by sqlite, I'd like to just display s开发者_StackOverflowome default values and the id. Is there a way to do this using SimpleCursorAdapter or should I look elsewhere?


As you want some specialist behaviour, you might be better off creating your own CursorAdapter implementation by extending CursorAdapter (or SimpleCursorAdapter). It's not too tricky and there are some good examples available with a quick search.

0

精彩评论

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