I have this code in Application_Start:
B4X:
pnlBottomMain.LoadLayout("bottompanel")
pnlBottomMain.Height = pnlBottom.height-2
pnlBottomMain.Top = MainPanel.Height - pnlBottomMain.Height
However, the layout adjustments are not shown. But if I put the same two lines in a click handler, it works...