Paul Leischow Member Licensed User Longtime User Feb 17, 2019 #1 Can someone point out what I am doing wrong here or is this a bug? If I add a layout using Activity.AddView and in the Layout Designer I set the Anchors of a Panel to Left/Top, the Panel displays as expected. If I do the exact same thing but set the Anchors to use full screen, I get a blank screen... nothing is displayed. If I load the same layout using Activity.LoadLayout("panel1") , it displays correctly. Attachments panel.zip 9.6 KB · Views: 174
Can someone point out what I am doing wrong here or is this a bug? If I add a layout using Activity.AddView and in the Layout Designer I set the Anchors of a Panel to Left/Top, the Panel displays as expected. If I do the exact same thing but set the Anchors to use full screen, I get a blank screen... nothing is displayed. If I load the same layout using Activity.LoadLayout("panel1") , it displays correctly.
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2019 #2 The solution is very simple. Have you seen the logs? There should be a warning at runtime about the panel size being zero. You should never load a layout to a zero sized panel. B4X: Activity.AddView(panel1,0,0,50%x,50%y) panel1.LoadLayout("panel1") Upvote 0
The solution is very simple. Have you seen the logs? There should be a warning at runtime about the panel size being zero. You should never load a layout to a zero sized panel. B4X: Activity.AddView(panel1,0,0,50%x,50%y) panel1.LoadLayout("panel1")