Sub CreateListItem(Text As String, ImageName As String) As Panel
Dim p As B4XView
p = xui.CreatePanel("")
p.Top = 0
p.Left = 0
p.Width = clvDiete.AsView.Width
p.Height = 200dip
'p.LoadLayout("element_Pasto") 'Commented for testing
p.Color = Colors.Red
p.SetColorAndBorder(p.Color, 1dip, Colors.Black, 40dip) 'want to round the panel
'lblTitlePasto.SetColorAndBorder(lblTitlePasto.Color, 1dip, 0xFF00C482, 10dip)
'lblTitlePasto.Text = Text
p.Top = 0
p.Left = 0
p.Width = clvDiete.AsView.Width
Return p
End Sub