carlbertech
Member
Iam trying to show/hide 2 layouts in one b4xpage class
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Dim Panel1, Panel2 As B4XView ' I add two panels
....
Sub B4XPage_Created (Root1 As B4XView)
Panel1.Initialize("") : Panel2.Initialize("")
Panel1.LoadLayout("Layout1") : Panel2.LoadLayout("Layout2")
Root=Root1
' Activity.AddView(Panel2, 0, 0, 100%x, 100%y) ' This does not work because is B4XPage not B4A Activity
Root.LoadLayout("Page1") ' Instead LoadLayout Page I would like show Panel1
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Dim Panel1, Panel2 As B4XView ' I add two panels
....
Sub B4XPage_Created (Root1 As B4XView)
Panel1.Initialize("") : Panel2.Initialize("")
Panel1.LoadLayout("Layout1") : Panel2.LoadLayout("Layout2")
Root=Root1
' Activity.AddView(Panel2, 0, 0, 100%x, 100%y) ' This does not work because is B4XPage not B4A Activity
Root.LoadLayout("Page1") ' Instead LoadLayout Page I would like show Panel1