Hi,
i read a CSV List with StringUtils.LoadCSV, transfer it into a other List with Custom Type an sort it.
my problem is, that the first insert in the List is move to the last Place in the sortet List, but it must the First.
(e.g. the Sort Result is
B
C
D
A)
i read a CSV List with StringUtils.LoadCSV, transfer it into a other List with Custom Type an sort it.
B4X:
'Declare in Process_Globals in B4A, Class_Global in B4J
Type SBWBerge (berg As String,Ref As String,wp As String)
'Code to read and Sort
Private Bergliste_in As List
Bergliste_in = su.LoadCSV(File.DirAssets,SBW_Bergliste,";")
Dim Bergliste_Sort As List
Bergliste_Sort.Initialize
For z=0 To Bergliste_in.Size-1
Dim Berge As SBWBerge
Dim tmpDaten() As String = Bergliste_in.get(z)
Berge.berg=tmpDaten(0).Trim
Berge.Ref=tmpDaten(1).Trim
Berge.wp=tmpDaten(2)
Bergliste_Sort.Add(Berge)
Next
Bergliste_Sort.SortTypeCaseInsensitive("berg",True)
my problem is, that the first insert in the List is move to the last Place in the sortet List, but it must the First.
(e.g. the Sort Result is
B
C
D
A)