I currently have many views (about 40) in each Layout that I resize by code (now it takes several seconds). Where should I put the call to load each Page so that it does not slow down the loading of the design?
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
LoadLayout
End Sub
Sub LoadLayout
Wait For B4XPage_Resize(Width As Int, Height As Int)
ResizeViews_Page1
ResizeViews_Page2
ResizeViews_Page3
ResizeViews_Page4
'....code
End Sub
Private Sub B4XPage_Resize (Width As Float, Height As Float)
Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
Root.SetLayoutAnimated(0, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub