Sub CreateListItem( Width As Int, Height As Int) As B4XView
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, Width, Height)
p.LoadLayout("customLayout") 'load custom layout
Dim PnlHeight As Int = pnlAllCustom.Height+ 7dip ' set a new height by getting the height of a view in the customLayout
p.SetLayout(0,0,Width,PnlHeight) 'set the height with the new height
Return p
End Sub