Croïd Active Member Licensed User Longtime User Sep 3, 2017 #1 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
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 Sep 3, 2017 #2 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 Sep 3, 2017 #3 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
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) ....
Croïd Active Member Licensed User Longtime User Sep 3, 2017 #4 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: Sep 3, 2017 Upvote 0
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("", "", "", "",""))