Android Question How do I save array form data with CustomListView

bollanog

Member
Hello everyone, I hope you are well, I have a small problem with a code, I am making a small form-type add load which, if in the format I place, 2 forms appear, but when it comes to saving data, it only loads the Last data, how do I set the data or variables of the views to be an array?

B4X:
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

Private Sub btnLogin_Click
Log(CustomListView1)
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…