Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private list1 As ListView
Private lbl1 As Label
Private lbl2 As Label
Private lbl3 As Label
Private clvClienti As CustomListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("laymain")
CaricaClienti
End Sub
Sub Activity_Resume
End Sub
Sub CaricaClienti
Dim pnlItem As Panel
pnlItem.Initialize("")
pnlItem.LoadLayout("layClienti")
Dim lbl1 As Label = pnlItem.GetView(1)
Dim lbl2 As Label = pnlItem.GetView(2)
Dim lbl3 As Label = pnlItem.GetView(3)
Dim Riga As tRigaClienti
Riga.Initialize
Dim line As String
Private Reader As TextReader
Dim a, b, c As String
Reader.Initialize(File.OpenInput(File.DirRootExternal, "FileAndroid.txt"))
line = Reader.ReadLine
clvClienti.Clear
Dim i As Int
Do While line <> Null
Log(line)
i=i+1
a=line.SubString2(0,4)
b=line.SubString2(5,15)
c=line.SubString2(0,10)
Riga.Nome = a
Riga.Cognome = b
Riga.Telefono = c
list1.AddSingleLine(a & " " & b)
lbl1.Text = a
lbl2.Text = b
lbl3.Text = c
clvClienti.Add(pnlItem,140dip,Riga)
line = Reader.ReadLine
Loop
Reader.Close
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub costumClienti_ItemClick (Index As Int, Value As Object)
CaricaClienti
End Sub
Sub clvClienti_ItemClick (Index As Int, Value As Object)
End Sub