Simplified Code Block:
Sub Item_LayoutCreator(LayoutName As String, LayoutPanel As Panel)
Dim imgCard As ImageView '0
imgCard.Initialize("")
imgCard.Gravity=Gravity.FILL
LayoutPanel.AddView(imgCard,0,0,ImageW,ImageH)
End Sub
Sub Item_ContentFiller(ItemID As Long, LayoutName As String, LayoutPanel As Panel, Position As Int)
Dim imgCard As ImageView
Try
imgCard=LayoutPanel.GetView(0)
Catch
Log("error - View0 is not ready")
Return
End Try
End Sub
Occasionally, this Try..Catch will trigger.
It is rare, and I have been unable to find any instance in which it is predictable or repeatable on demand.
So 2 questions :-
1. What could be causing the ContentFiller to be called before the LayoutCreator?
2. Is there a better way of handling the error (currently, it gives a blank entry which fixes itself when scrolled)?
Thank you.