I did some testing with this code:
If scroll1.IsInitialized = True Then Log("scroll1 is initialized")
But the scroll1 B4XView still gave the same error.
So here is the code with a ScrollPane (B4J):
'Private scroll1 As B4XView
Private scroll1 As ScrollPane
'If scroll1.IsInitialized = True Then Log("scroll1 is initialized")
'scroll1.ScrollViewInnerPanel.LoadLayout("myprofile")
'scroll1.ScrollViewContentHeight = pnlData.Height
scroll1.LoadLayout("myprofile",scroll1.PrefWidth,scroll1.prefHeight)
scroll1.InnerNode.PrefHeight = pnlData.Height
This is the result:
In the Visual Designer i have stretched the scroll1 ScrollPane to cover the form width and height. The anchors remained.
The comments in the code were the original lines with a B4XView.
The question still remains why the B4XView throws this error... can somebody explain this?