Hi Murphy,

I've one query regarding sorting on chinese characters which can be
used in displaying contact information on screen. Can you provide some
logic or way to do sorting on contact db for chinese contacts?

I've done with RuleBasedCollator for Locale CHINA and CHINESE but I am
not getting the desired result. What exactly I've done is copied the
database information to my class which implements the cursor and than
set the rules for Locale CHINA and CHINESE and generated the
CollationKeys for each contact information. After that I passed the
keys to Array.sort() methods and displayed the result. It do the sort
but not perfectly.

Can you please help me in this regard or let us know any other way to
work around.

Thanks
Irshad

Mark Murphy wrote:
> Alam wrote:
> > 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?
>
> Yes.
>
> > How can we use CursorWrapper to wrap our original cursor? Can you give
> > some examples on this?
>
> http://github.com/commonsguy/cw-advandroid/tree/e50e087577f8b28e727355c55097a5da2577d6d3/Database/JoinCursor
>
> (or http://bit.ly/KRDlt if that URL is too long)
>
> This is one of the examples from my book _The Busy Coder's Guide to
> *Advanced* Android Development_. Here, I use a CursorWrapper to
> implement a JoinCursor -- akin to the built-in CursorJoiner, but with
> greater flexibility.
>
> A SortingCursor would not need to be quite so complex. Mostly, it would
> need to override the move...() series of methods to translate positions
> in the sorted results to positions in the original unsorted results.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Looking for Android opportunities? 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