Trying to write an utility routine useful to move a B4XView from a B4XPage to another one, I found... a wall ?
For this routine it would be necessary to obtain the base of the B4XView and also to be able to apply a specified elevation to it (please, do not answer that BringToFront is enough since it isn't).
Note:
a - luckily I just want to move a full screen panel containing only a B4XLoadingIndicator and this is easy to do (I could also put these two views in each layout but I don't like it)
b - moving views from one page to another can be done but unfortunately it will not be possible to "move" the event routines - I should think of a way to "delegate" them.
For this routine it would be necessary to obtain the base of the B4XView and also to be able to apply a specified elevation to it (please, do not answer that BringToFront is enough since it isn't).
B4X:
Public Sub MoveViewBwPages(xView As B4XView, DestPageRoot As B4XView, Elevation As Int)
MoveViewBwPages2(xView, DestPageRoot, xView.Left, xView.Top, xView.Width, xView.Height, Elevation)
End Sub
Public Sub MoveViewBwPages2(xView As B4XView, DestPageRoot As B4XView, Left As Int, Top As Int, Width As Int, Height As Int, Elevation As Int)
xView.RemoveViewFromParent
DestPageRoot.AddView(xView, Left, Top, Width, Height)
' Here I would set the elevation of the xView's base.
End Sub
Note:
a - luckily I just want to move a full screen panel containing only a B4XLoadingIndicator and this is easy to do (I could also put these two views in each layout but I don't like it)
b - moving views from one page to another can be done but unfortunately it will not be possible to "move" the event routines - I should think of a way to "delegate" them.