Private Sub CreateItem(messaggio As String, currentUser As String, userPhotoReceiver As String,Width As Int) As Panel
Dim p As B4XView = xui.CreatePanel("")
Dim height As Int = 75dip
p.SetLayoutAnimated(0, 0, 0, Width, height)
If currentUser Then
p.LoadLayout("cellMessageCurrentUser")
Else
p.LoadLayout("cellMessageOther")
End If
Dim links_foto As Map
links_foto.Initialize
If currentUser Then
Dim photourl As String = fp.leggi_parametro("photo","")
links_foto.Put(ImageView2, photourl)
Else
links_foto.Put(ImageView1, userPhotoReceiver)
End If
CallSubDelayed2(ImageDownloader, "Download", links_foto)
lblContent.Text="" & messaggio
lblContent.BringToFront
Return p
End Sub