Hi, I have a cross platform project (B4i and B4A) with shared classes an it is really only a small part of code, that cannot be shared, because of the special B4A Activity (Process_Globals / Globals). So my question, is there a way to fill also CustomListView items in a shared module or class? The problem is, that I need the views (like label "lblItemInfo"), which are in B4A destroyed when the Activity is destroyed.
B4X:
Sub ShowBookItems
Dim li As List = Main.cG.GetBookItems
clvBook.Clear 'CustomListView
For Each t As BookItemType In li
clvBook.Add(CreateBookItem(t), t)
Next
End Sub
Sub CreateBookItem(t As BookItemType) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 100%x, 90dip)
p.LoadLayout("viewItmBook")
lblItemInfo.Text = t.nr
Return p
End Sub