Paul Leischow Member Licensed User Longtime User Apr 18, 2019 #1 In B4A I can design a layout in the layout designer and add it as a view. Then use the Visible command to display it. I can also create a second layout with a transparent background and display that view over top the current visible layout. How do I accomplish the same thing in B4I ? The LoadLayout only seems to work with RootPanel (unless I missed something) and when you bring a layout in to view any previous layout is removed. I can't seem to place a transparent background layout over an existing layout. B4A Psudo Code... Code: Copy Activity.LoadLayout("Main") screen1.Initialize("") Activity.AddView(screen1,0,0,100%x,100%y) screen1.LoadLayout("screen1") screen2.Initialize("") Activity.AddView(screen2,0,0,100%x,100%y) screen2.LoadLayout("screen2") screen1.Visible=True
In B4A I can design a layout in the layout designer and add it as a view. Then use the Visible command to display it. I can also create a second layout with a transparent background and display that view over top the current visible layout. How do I accomplish the same thing in B4I ? The LoadLayout only seems to work with RootPanel (unless I missed something) and when you bring a layout in to view any previous layout is removed. I can't seem to place a transparent background layout over an existing layout. B4A Psudo Code... Code: Copy Activity.LoadLayout("Main") screen1.Initialize("") Activity.AddView(screen1,0,0,100%x,100%y) screen1.LoadLayout("screen1") screen2.Initialize("") Activity.AddView(screen2,0,0,100%x,100%y) screen2.LoadLayout("screen2") screen1.Visible=True
Semen Matusovskiy Well-Known Member Licensed User Apr 19, 2019 #2 https://www.b4x.com/b4i/help/views.html LoadLayout (LayoutFile As String) As LayoutValues Loads a layout file to the panel. Any panel, not Page.RootPanel only. In general an algorithm is similar as in B4A. Upvote 0
https://www.b4x.com/b4i/help/views.html LoadLayout (LayoutFile As String) As LayoutValues Loads a layout file to the panel. Any panel, not Page.RootPanel only. In general an algorithm is similar as in B4A.
Paul Leischow Member Licensed User Longtime User Apr 19, 2019 #3 Ok, I finally figured it out. I wasn't seeing the screen2.LoadLayout option because I had screen2 defined as a Page instead of Panel... which is why I was seeing screen2.RootPage.LoadLayout as the only option. Thanks for the feedback. Last edited: Apr 19, 2019 Upvote 0
Ok, I finally figured it out. I wasn't seeing the screen2.LoadLayout option because I had screen2 defined as a Page instead of Panel... which is why I was seeing screen2.RootPage.LoadLayout as the only option. Thanks for the feedback.