Android Question List.SortType() with Localization

androh

Member
Licensed User
Longtime User
I see a example code for List.Sort() from here
https://www.b4x.com/android/forum/threads/sort-list-of-strings-with-localization.67429/#post-427098

B4X:
Sub SortListWithDeviceLocale(l1 As List)
   Dim collator As JavaObject
   collator = collator.InitializeStatic("java.text.Collator").RunMethod("getInstance", Null)
   collator.RunMethod("setStrength", Array (0))
   Dim jo As JavaObject
   jo.InitializeStatic("java.util.Collections").RunMethod("sort", Array(l1, collator))
End Sub

How can I use this code with List.SortType() ?
 
Top