Results from multiple tables in one list view

15 views
Skip to first unread message

Neil Mole

unread,
Jul 22, 2017, 7:20:36 AM7/22/17
to ORMLite Android Users
I need to combine queries from a few tables/DAOs to be shown in one RecyclerView, each table grouped together. Each DAO maps to its own view type.
I can't find an example or discussion on how this might be done.

MergeCursor seems like it might be useful but would need extending, along with extending OrmLiteCursorAdapter<Object>, to select the PreparedQuery depending on which child cursor is backing the current row.
MergeCursor doesn't seem to have a way to find out what the current child cursor is, and clashing _id values will need to be mapped to (ideally constant) unique values.

I think the above is doable but is there an easier way?

Thanks
Neil

Reply all
Reply to author
Forward
0 new messages