Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:31:43+00:00 2026-06-08T00:31:43+00:00

I have what I assumed was a straight forward issue, but after a thorough

  • 0

I have what I assumed was a straight forward issue, but after a thorough search I can find no solution:

I have two data sources with two distinct data types: apples and oranges. The only column in common is “datePicked”. I want to query the separate databases and then display both apples and oranges in the same list ordered and grouped by “datePicked”.

I see some suggestions to use MergeAdapter. However, unless I am missing something, MergeAdapter simply concatenates two Adapters, it doesn’t really merge them. Likewise, I have seen suggestions to use MatrixCursor or MergeCursor to create a single unified cursor and then creating an adapter for that. Neither seem a good solution. MergeCursor appears only to concatenate the cursors, while MatrixCursor appears to require that I iterate through both datasets start to finish building a cursor row by row. Even if these were acceptable solutions, I still have the problem that different schema require different layout on the screen. How would I inflate different layout based on underlying data type?

So I am stumped, and would appreciate any help. Is there a true merge adapter that will interleave the data rather than just concatenate it? If not, is there a way to create an Adapter that conditionally maps and inflates a layout based on some business logic done to the specific row being pointed at by the cursor?

Sorry if I am missing something obvious.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:31:45+00:00Added an answer on June 8, 2026 at 12:31 am

    To answer my own question, it appears that building a Matrix cursor with a merge-sorted-list type algorithm stepping through both cursors, and then conditionally inflating a row layout by overriding the newView() method with an if statement is the only workable solution. I will post the code for anyone who is interested once I’ve worked out the details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have learned that builds should be very straight forward and requires less human
I currently have a fairly straight forward app, my first attempt at MVVM using
The scenario is quite straight forward: I have content in table A and tags
I think my question is quite straight forward. Assume I have a gridview, a
This might be a straight forward answer, and I know that you don't have
I have assumed that if instance variables are managed by spring IOC, and are
For some reason I have always assumed that most of the time a variable
I have had to make changes to a trigger and assumed that running an
An array is defined of assumed elements like I have array like String[] strArray
I have a class templated on <PIXEL> , assumed to be one of boost::gil

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.