#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim Contatti As Contacts2
Dim Rubrica As List
Dim edtName As EditText
Dim ContattoSingolo As Map
Dim ListView1 As ListView
Dim ListaABC As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("RicercaContatto")
ListView1.Initialize("Rubrica")
Activity.AddView(ListView1, 0, 100, 480, 600)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnSearch_Click
ListView1.Clear
Rubrica = Contatti.FindByName(edtName.Text, False, True, False)
For i = 0 To Rubrica.Size -1
Dim Contatto(Rubrica.Size) As Contact
Contatto(i) = Rubrica.Get(i)
Dim PhoneNo As Map
PhoneNo = Contatto(i).GetPhones
For p = 0 To PhoneNo.Size -1
ListView1.AddTwoLines2(Contatto(i).DisplayName, PhoneNo.GetKeyAt(p), i)
Next
Next
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
Log("click")
End Sub
Sub ListView1_ItemLongClick (Position As Int, Value As Object)
Log("long click")
End Sub