Private Sub CreateItem(Width As Int, nnn As Int) As Panel
Dim p As B4XView = xui.CreatePanel("")
Dim height As Int = 120dip
If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 310dip
p.SetLayoutAnimated(0, 0, 0, Width, height)
p.LoadLayout("fromEquipos")
color.Text = ""
modelo.Text = ""
serial.Text = ""
nn.Text = nnn
Return p
End Sub
Private Sub Cantidad_TextChanged (Old As String, New As String)
If Cantidad.Text == 0 Or Cantidad.Text == "" Then
CustomListView1.Clear
Else
For i = 0 To Cantidad.Text - 1
CustomListView1.Add(CreateItem(CustomListView1.AsView.Width, i+1), i)
Next
End If
End Sub