Android Question xCustomListView - change row

giannimaione

Well-Known Member
Licensed User
Longtime User
hi,
with lib xCustomListView 1.70 and XUI 1.90, i make a list (CustoListView) with a many rows.
B4X:
Private athletes As CustomListView
Type bloccoCLI (blcRagsoc As Label, blcCodcli As Label)
B4X:
    athletes.Clear
    For i=0 To rec.RowCount-1
        Dim blc As bloccoCLI
        blc.Initialize
        blc.blcCodcli.Initialize("")
        blc.blcRagsoc.Initialize("")
        rec.Position=i
        '
        dim codcli as string
        codcli=rec.GetString("codcli")
        blc.blcCodcli.Text=codcli
        '
        dim Name as string
        Name=rec.GetString("ragsoc")
        blc.blcRagsoc.Text=name
        '
        Dim p As B4XView = xui.CreatePanel("")
        p.SetLayoutAnimated(0,0,0,athletes.AsView.Width,50dip)
        athletes.Add(p,blc)
    Next
    rec.Close
and
B4X:
Sub athletes_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int)
'lazy loading
Dim ExtraSize As Int = 10
    For i = Max(0, FirstIndex - ExtraSize) To Min(LastIndex + ExtraSize, athletes.Size - 1)
        Dim p As B4XView
        p = athletes.GetPanel(i)
        If p.NumberOfViews = 0 Then
            Dim blc As bloccoCLI = athletes.GetValue(i)
            p.LoadLayout("crtCLIENTI")
            lblCLIENTI.Text=blc.blcRagsoc.Text
        End If
    Next
End Sub
and this is OK
but, how to change content of any rows?
 
Top