Android Question xCustomListView x2 errors

leitor79

Active Member
Licensed User
Longtime User
Hello,

I'm having 2 issues with customlistview.

First of all, this is the code:

B4X:
Sub Globals
    Private clvLista As CustomListView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("layMain")
  
    Dim i As Int

  
    For i = 1 To 5
        clvLista.add(CreateListItem, "")
    Next
 
End Sub

Sub CreateListItem() As B4XView
    Dim p As B4XView
    P = xui.CreatePanel("")
    P.SetLayoutAnimated(0,0,0,100%x,100%y)
    p.LoadLayout("layItem")
    Return p
End Sub

The first error is the following, and only happens when I execute in debug mode:

B4A Version: 8.00
Parsing code. (0.05s)
Compiling code. Error
Error compiling program.
Error description: Too many parameters.
Error occurred on line: 46
clvLista.add(CreateListItem,"")
Word:


The second error, when executed in release mode, the app runs but crashes:

 

leitor79

Active Member
Licensed User
Longtime User
Hi,

Both issues were fixed by removing the xCustomListView library reference (v1.53) and including the xCustomListView code module instead (v1.54)
 
Upvote 0