Sub Class_Globals
Private imgSubCat As B4XView
End Sub
Private Sub CreateItem (aNID As Int, aTitle As String, aImg As Bitmap, iv As ItemValue) As B4XView
Private pnl As B4XView = xui.CreatePanel("")
pnl.SetLayoutAnimated (0,0,0,100%x, 300dip)
pnl.LoadLayout("subcat_itemlayout")
imgSubCat.SetBitmap(aImg.Resize(pnl.Width, 300dip, True))
lblSubCatTitle.Text = aTitle
iv.nid = aNID
iv.title = aTitle
iv.img = aImg
Return pnl
End Sub