Android Question Sort map

Bobi

Member
Licensed User
Longtime User
I read an old post https://www.b4x.com/android/forum/threads/how-to-sort-map-by-value.15612/#post-329986 but I really do not know how to adapt solution for my problem because is little more tricky:

B4X:
mapOrders.Put(idest, CurrentOrder)

Where CurrentOrder is more complex

B4X:
Type CurrentOrder (id_Contract As Int, LaTermen As Boolean, Client As String, Adresa1 As String, Adresa2 As String, Obs As String, id_Comanda As Int, id_Client As Int, _
                            id_Adresa As Int, IntervalLivrare_DeLa As String, IntervalLivrare_PanaLa As String, Stare As Int, PrimaInstalare As Int, BonListat As Int, _
                            FacturaListata As Int, GPS_W As Double, GPS_N As Double, TertAsociat As String, ObservatiiLivratorLaClient As String, Intarziata As Boolean, Livrabila As Boolean, Viitoare As Boolean, DistanceTemp As Int, MarkDist As Boolean)

I have to sort mapOrders by DistanceTemp which was stored inside of CurrentOrder. I know, type and map value have the same name but just for this post

Any suggestion?
Thanks!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…