Hi,
I am trying to insert a SideMenu in my page which is using a Navigatation Controller which is inserted in TabBar Controller. But it doesnt work.
Can you advise the solution please,
Code:
I am trying to insert a SideMenu in my page which is using a Navigatation Controller which is inserted in TabBar Controller. But it doesnt work.
Can you advise the solution please,
Code:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1,page2 As Page
Dim smc As SideMenuController
Dim tbc As TabBarController
End Sub
Private Sub Application_Start (Nav As NavigationController)
'create a new navigation controller
Dim nc As NavigationController
nc.Initialize("nc")
NavControl = nc
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
tbc.Initialize("tbc")
'Page1.RootPanel.LoadLayout("1")
page2.Initialize("page2")
page2.RootPanel.Color=Colors.Magenta
page2.Title="Page2"
Dim lp As Page
lp.Initialize("lp")
lp.RootPanel.Color = Colors.Red
'lp.RootPanel.LoadLayout("1")
Dim rp As Page
rp.Initialize("rp")
rp.RootPanel.Color = Colors.Green
'rp.RootPanel.LoadLayout("1")
tbc.Pages=Array(nc,page2)
App.KeyController=tbc
smc.Initialize(lp, nc, rp)
nc.ShowPage(Page1)
Page1.TopRightButtons = Array(smc.CreateBarButton("right"))
Page1.TopLeftButtons = Array(smc.CreateBarButton("left"))
End Sub