B4J Question [solved] xCustomListView not showing webview

Lahksman

Active Member
Licensed User
Longtime User
Hi all

I'm trying to load a webview inside a customlistview but all i'm getting is a blank listview with the currect number of items.
1604934210701.png

This is the code I'm using to fill the customlistview
B4X:
Sub btnSetOphalen_Click
    Dim setNummer As String = txtSetNummer.Text & "-1"
    objSet.Initialize
    Wait For(Rebrickable_API.DownloadSets(setNummer,Auth_key)) Complete (Result As Boolean)
    Wait For(Rebrickable_API.DownloadTheme(objSet.SetThemaId,Auth_key)) Complete (Result As Boolean)
    Wait For(Rebrickable_API.DownloadParts(objSet.SetNumber,Auth_key)) Complete (arParts As List)
    If Not(objSet.SetHoofdThemaId = "-1") Then
        Wait For(Rebrickable_API.DownloadParentTheme(objSet.SetHoofdThemaId,Auth_key)) Complete (Result As Boolean)
    End If
    wvSetAfbeelding.LoadUrl(objSet.SetAfbeelding)
    lblSetAantalStukken.Text = objSet.SetAantalStukken
    lblSetNaam.Text = objSet.SetNaam
    lblSetNummer.Text = objSet.SetNumber
   
    Log("# of parts: " & arParts.Size)
    xlvSetOnderdelen.Clear
    For Each v_part In arParts      
        Dim objPart As Part = v_part
        xlvSetOnderdelen.Add(CreateItem(objPart),"")
    Next
    Log("listview size: " & xlvSetOnderdelen.Size)
End Sub

Private Sub CreateItem (v_objPart As Part) As B4XView
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0,0,0,100,100)
    p.LoadLayout("ItemLayout")
    Log(v_objPart.PartAfbeelding)
    wvPartAfbeelding.LoadUrl(v_objPart.PartAfbeelding)
    Return p
End Sub

As you can see in the log, all items are created but nothing is showing.
B4X:
# of parts: 11
https://cdn.rebrickable.com/media/parts/elements/4565322.jpg
https://cdn.rebrickable.com/media/parts/elements/4211387.jpg
https://cdn.rebrickable.com/media/parts/elements/6000066.jpg
https://cdn.rebrickable.com/media/parts/elements/302021.jpg
https://cdn.rebrickable.com/media/parts/elements/6301842.jpg
https://cdn.rebrickable.com/media/parts/elements/6129855.jpg
https://cdn.rebrickable.com/media/parts/elements/6129855.jpg
https://cdn.rebrickable.com/media/parts/elements/6331610.jpg
https://cdn.rebrickable.com/media/parts/elements/6308997.jpg
https://cdn.rebrickable.com/media/parts/elements/6070714.jpg
https://cdn.rebrickable.com/media/parts/elements/6070714.jpg
listview size: 11
 

Lahksman

Active Member
Licensed User
Longtime User
I'm using a webview to avoid having to download all the pictures, this set only has 11 parts, but there are also sets with several hundreds of parts.
If someone has a better way of doing this, please say so.

I've double checked name and it's indeed wvPartAfbeelding, generated the member from the layout designer.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top