Sub Globals
Dim ListView1 As ListView
Dim List3 As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
ListView1.Initialize("ListView1")
If File.Exists(File.DirRootExternal,"languages.csv") Then
ReadData
Else
WriteData
End If
For i = 0 To List3.Size - 1
ListView1.AddSingleLine(List3.Get(i))
Next
Activity.AddView(ListView1, 0, 0 , 100%x, 100%y)
End Sub
Sub WriteData
List3.Initialize
List3.AddAll(Array As String("Deutsch","English","Français","Español","Português","Italiano","Dansk","Suomalainen","Nederlandse","Polski","Svenska","Türk","ZZZ"))
List3.Sort(True)
File.WriteList(File.DirRootExternal, "languages.csv", List3)
End Sub
Sub ReadData
List3.Initialize
List3 = File.ReadList(File.DirRootExternal, "languages.csv")
End Sub