On Tue, Feb 1, 2011 at 10:23 PM, Mystique <[email protected]> wrote:

> Hi Treking, I have many sets of hashmap which each set is a group
> of related data, I then store it into ArrayList for display into a ListView.
> Something like that.
>

OK. You're complicating things. Create you own class that has all the
properties you care about (Name, age, whatever), then have one ArrayList of
that type.

Then, when you want to sort, use this:
http://developer.android.com/reference/java/util/Collections.html#sort(java.util.List<T>,
java.util.Comparator<? super T>)
<http://developer.android.com/reference/java/util/Collections.html#sort(java.util.List<T>,
java.util.Comparator<? super T>)>
With a Comparator you define to compare based on the Age.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
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