Android Question All Array As String in one list

Croïd

Active Member
Licensed User
Longtime User
Hi
I use the location.DistanceTo function to see points near my position.
I want to use the sort function with list, but the problem, I have many ArrayList, so it does not work !

Log(ListkMarkersNearMe)

B4X:
(ArrayList) [6616]
(ArrayList) [29351]
(ArrayList) [16025]
(ArrayList) [22367]
(ArrayList) [2674]

How to compile all Array As String("29351","16025", "22367", "2674") in a single list for use xxxx.Sort(True) ?

Thks
 

DonManfred

Expert
Licensed User
Longtime User
Add the arrays to a list. Write a small sub which adds one of them to a list...
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Thks Don

I will recreate a list with a selection from the listview

B4X:
Dim Poi1, Poi2 As String
Poi1 = ListView.GetItem(1)
Poi2 = ListView.GetItem(2)
....
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
solution Poi1 = ListView.GetItem(1) not work for sort (idem with list.Get(x) )

B4X:
listBase(ArrayList) [6616]
listBase(ArrayList) [29351]
listBase(ArrayList) [16025]
listBase(ArrayList) [22367]
listBase(ArrayList) [2674]
--------------------------------------------
ListMarkerNearShow.Sort(True)
ListMarkerNearShow (ArrayList) [16025, 22367, 2674, 29351, 6616]


Strange because sort function works very well if i write but not read data in listbase.AddAll(Array As String("", "", "", "",""))
 
Last edited:
Upvote 0
Top