Thanks Murphy for your replies.

I've one question w.r.t MatrixCursor. I've done one implemetation
where one class implements the Cursor. This class is implementing all
cursor method. The class also contains one multidimensional string
array which stores each column records from the database.

If I am not wrong than my above said class is similar to
MatrixCursor?

How can we use CursorWrapper to wrap our original cursor? Can you give
some examples on this?

Thanks and Regards
Irshad

Mark Murphy wrote:
> Alam wrote:
> > Can you please elaborate in creating a new cursor?
>
> Option #1: Re-run whatever query got you your first Cursor, except you
> substitute in the other ORDER BY clause to get the results sorted the
> way you want.
>
> Option #2: Build up a MatrixCursor with the data you want in the order
> you want.
>
> Option #3: Rather than sort the data, build an ArrayList<> of positions
> in the proper sort order. Then, use a CursorWrapper to wrap your
> original Cursor, returning rows the desired order. This is the most
> efficient (at least in terms of memory consumption) but is the most
> complicated to set up.
>
> There are probably other options, but those should give you a starting
> point.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Need Android talent? Ask on HADO! http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to