Private Sub CreateItemHorizontal(Width As Int, img As String, Nome As String, Codice As String, Versamento As Double,Prelievo As Double ) As Panel
Dim xui As XUI
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(5000,0, 0,Width, 342dip)
'p.SetLayoutAnimated(5000,0, 0,Width, 380dip)
p.LoadLayout("cardsList")
AjustaImageView(ImageView1carda,File.DirAssets, img)
Dim saldo As Double=Versamento-Prelievo
LblTitolare.Text=Nome
' LblSaldo.Text="€ " & NumberFormat2(saldo,0,2,2,True)
' LblUscite.Text="€ " & NumberFormat2(Prelievo,0,2,2,True)
' LblVersamenti.Text="€ " & NumberFormat2(Versamento,0,2,2,True)
LblSaldo.Text="€ " & NumeroItaliano(saldo,2)
LblUscite.Text="€ " & NumeroItaliano(Prelievo,2)
LblVersamenti.Text="€ " & NumeroItaliano(Versamento,2)
'NumberFormat2(fTotal,0,2,2,True)
'Log(NumberFormat2(-101010101010101500.5553, 1, 2, 2, True)) ' <-- -101,010,101,010,101,504.00
'Log(NumberFormat2(101010101010101500.5553, 1, 2, 2, True)) ' <-- 101,010,101,010,101,504.00
If saldo<500 Then
LblSaldo.TextColor=0xFFFF0505 ' colore rosso
Else
LblSaldo.TextColor=0xFF5ECA00 ' colore Verde
End If
Return p
End Sub