Sub InfoVol_Click
Dim Calls As List
Dim CallLog As CallLog
Calls = CallLog.GetAll(10) 'Get the last 10 calls
ListView1.Top=0
ListView1.Left=0
ListView1.Height=100%y
ListView1.Width=100%x
ListView1.Visible=True
For i = 0 To Calls.Size - 1
Dim C As CallItem
C = Calls.Get(i)
Dim callType, name As String
Select C.CallType
'Ricvute
Case C.TYPE_INCOMING
callType="Incoming"
'Perse
Case C.TYPE_MISSED
callType = "Missed"
'Fatte
'' Case c.TYPE_OUTGOING
'' callType = "Outgoing"
End Select
name = C.CachedName
'Creo quadro
If name = "" Then name = "N/A"
'Cerco Foto
Dim Contacts1 As Contacts
Dim listOfContacts As List
listOfContacts = Contacts1.FindByName(name, False)
For ii = 0 To listOfContacts.Size - 1
Dim Contact As Contact
Contact = listOfContacts.Get(ii)
Log(Contact) 'will print the fields to the LogCat
Dim photo As Bitmap
photo = Contact.GetPhoto
Next
If name="N/A" Then
photo=LoadBitmap(File.DirAssets,"NoPhoto.png")
End If
ListView1.AddSingleLine("User:" & i)
''ListView1.AddTwoLinesAndBitmap(name & " - (" & callType & ") - Date:" & DateTime.Date(C.Date) & " - Time:" & DateTime.Time(C.Date) , C.Number, photo)
Log("Number=" & C.Number & ", Name=" & name _
& ", Type=" & callType & ", Date=" & DateTime.Date(C.Date) & ", Ora=" & DateTime.Time(C.Date))
Next
End Sub