Android Question xCustomListView problem

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
i started to use B4A 9.01 and i opened my old projects with it,
and i unchecked CustomListView from the lib and checked the xCustomListView
every thing was alright except my (clv.add) and (clv2.insertat)
and gives the following error
and the line of code witch rise that error is
B4X:
clv2.InsertAt(0,CreateListItem("dd",clv2.AsView.Width, 60dip), $"Item !!!"$)
''''''''''''''''''''''' creat panel function''''''''''''''''''''''''''
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
    Dim p As Panel
    p.Initialize("")
    p.SetLayout(0, 0, Width, Height)
    p.LoadLayout("cellitem2")
    Label1.Text = Text
    Return p
End Sub

i'd like to note that i downloaded b4a example of (xCustomListView) it works fine
and also im did not add the module (CustomListView.bas) to the project

i hope to find answer after tow days searching in similar problems in B4A forum?
 
Last edited:

jimmyF

Active Member
Licensed User
Longtime User
If you have switched your CustomListView then if you have a Layout file with a CustomListView then you will need to delete the CustomListView, save it, and then add it back from the CustomViews list.

Hope this makes sense
-j
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
i deleted the (clv) from layout and i recreated new one with same name and saved the project and reopened it again but error still as it is
 
Upvote 0

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
thank Mr Erel
i solved the problem by deleteing the layout its self (not just deleting the CLV from it) and i recreate the layout in B4X 9 and the CLV after that every thing work fine
thanks a lot for you Mr Erel again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…