Hi everybody! I don't know why, but i don't see the navigationbar, after putting a tabbarcontroller.
I've 3 pages. First page is like a splash screen, so i've a button and disabled navigationbarvisible.
When i click on button, i need to show tabbarcontroller, in which each page as title and 2 custom button (left and right). This is my code. Anyone can help me? Thanks
This is the first page
I've 3 pages. First page is like a splash screen, so i've a button and disabled navigationbarvisible.
When i click on button, i need to show tabbarcontroller, in which each page as title and 2 custom button (left and right). This is my code. Anyone can help me? Thanks
This is the first page
B4X:
Private Sub Application_Start (Nav As NavigationController)
Utils.loc.Initialize(File.DirAssets,"dgtran.db",False)
NavControl = Nav
MainPage.Initialize("Page1")
MainPage.RootPanel.Color = Colors.White
NavControl.ShowPage(MainPage)
MainPage.RootPanel.LoadLayout("Main")
NavControl.NavigationBarVisible = False
tbc.Initialize("")
End Sub
Sub button1_Click
Utils.CreateLayout
End Sub
B4X:
Sub CreateLayout
Dim create As Boolean = true
If create Then
Main.App.KeyController = Main.tbc
Dim no As NativeObject = Main.tbc
no.GetField("tabBar").SetField("tintColor", no.ColorToUIColor(0xFFED7B53)) 'active item
Dim tbb As TabBarItem
tbb.Initialize("Scala grafica",LoadBitmap(File.DirAssets,"ios_menu_0_off.png"),LoadBitmap(File.DirAssets,"ios_menu_0_on.png"))
Dim scal As Scala
scal.Initialize()
scal.GetPage.TabBarItem = tbb
Dim tbb As TabBarItem
tbb.Initialize("Analisi",LoadBitmap(File.DirAssets,"ios_menu_1_off.png"),LoadBitmap(File.DirAssets,"ios_menu_1_on.png"))
Dim an As analisi
an.Initialize()
an.GetPage.TabBarItem = tbb
Main.tbc.Pages = Array(scal.GetPage,an.GetPage)
Main.NavControl.NavigationBarVisible = True
End If
End Sub