I have a method that queries a database table via a provider and returns a CursorLoader
to be used to populate a UI via a CursorAdapter
.
I need in one particular case only to add some extra data that are not part of the database result set.
Is there a way to somehow for that case add some extra "fake" rows with the data?
Like creating a cursor loader from two data sources?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
Yes. Use MatrixCursor to add some "fake" rows. Then merge the two cursors (CursorAdapter, MatrixCursor) using the MergeCursor class. MergeCursor will present the two Cursors as a single linear Cursor.