Android Question a question about lists

Mostez

Well-Known Member
Licensed User
Longtime User
I have two unsorted lists, FieldsNames that contains elements (for example B,D,A,C) and empty list tmpFiledsNames, both of them are declared in the same activity SQLmaker
B4X:
Public FieldsNames As List
this code to set the list (from another activity)
B4X:
SQLmaker.FieldsNames = St.TableColumns
I use this code to temp store sorted version of FieldsNames, but when I do that, I get both lists sorted! both lists contain (A,B,C,D)
B4X:
Dim tmpFiledsNames As List = FieldsNames
    tmpFiledsNames.Sort(True)

I'd like to know how to keep the original one FieldsNames as it is without sorting after sorting the other one

TIA
 
Top