I am trying to create a custom XUI view. In it I load a layout using CallSubDelayed, as is necessary.
The layout contains only a B4XImageView (it's just a test, certainly not a useful custom view). The CV has a property to set the B4XBitmap of this B4XImageView.
In the B4J project that uses it I had to add a Sleep (0) so that the sw did not crash; in the B4A project not even this is enough.
1. Where is the error message?
2. No need to use CallSubDelayed in DesignerCreateView. Better to add Sleep(0).
B4X:
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
mBase = Base
Tag = mBase.Tag
mBase.Tag = Me
Sleep(0)
mBase.LoadLayout("layCVTest")
End Sub
Removing the CV from the main layout and adding it again, it works (B4A native ImageView; I have to test with B4XImageView but I suppose it will work).