Re: [android-developers] Re: how to query from two unrelated tables and display data in same listview
Hi skink,
cursors point to different tables and tables have different column names.How do i know that this cursor points to this table?
How do i display data from different tables?
Regards,
vijay.k
-- On Wed, Dec 26, 2012 at 9:48 PM, skink <pskink@gmail.com> wrote:
Cursor cs[] = new Cursor[2]
Vijay Krishnan wrote:
> my question is when i m having two cursors that points to different data
> and i want to display the data in same listview.How could this can be done
> by merge cursor?
>
>
cs[0] = ... // first query
cs[1] = .. // second query
MergeCursor mc = new MergeCursor(cs)
// here you can create
// SimpleCursorAdapter
// and use it as your list adapter
pskink
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home