Android Question label not showing in customlistview

leitor79

Active Member
Licensed User
Longtime User
Hi,

I'm struggling with this stupidity for three hours now. I can't figure it out. I have a customlistview and I want to add items: a panel with a label. The label is not shown.

This is my code:

B4X:
Dim p1 As B4XView = xui.CreatePanel("")
    Dim id As ItemData
       
    p1.LoadLayout("layItemCategoria")
    p1.SetLayoutAnimated(100, 0, 0, lstMain.AsView.Width, 84dip)
    p1.SetColorAndBorder(Colors.Blue, 0, Colors.White, 0)
    
    lblItemCategoriaTexto.text = sNombre
    lblItemCategoriaTexto.textcolor = Colors.White
    id.Initialize
    id.lbl = lblItemCategoriaTexto
    id.pnl = pnltemCategoria
    lstMain.Add(p1, id)
    Return p1

This is my layout, and this is what I see when I load the app.
20191031_014831.png clv.png

The code shown load the blue item (the white items are loaded by other code and I can't see the text either). I've tried a lot of things; too many to describe. lstMain.AddTextItem("text", id) works (I see the text in that case).

Thank you.
 
Top