iOS Question Close Page

MarcoRome

Expert
Licensed User
Longtime User
Hi all. I have this code with SideMenu

B4X:
Public Sub Show
 
    nc.Initialize("nc")
    Main.NavControl = nc

            pg.Initialize("pg")
            pg.RootPanel.Color = Colors.Black
            pg.RootPanel.LoadLayout("lay_home")
            pg.Title = Main.nome_pizzeria
  
            lp.Initialize("lp")
            lp.RootPanel.Color = Colors.Red
            lp.RootPanel.LoadLayout("lay_home_ordini")
 
            'Per il secondo menu Pizze su Misura
            Dim rp As Page
            rp.Initialize("rp")
            rp.RootPanel.Color = Colors.Green
            rp.RootPanel.LoadLayout("lay_misura")
            smc.Initialize(lp, nc, rp)
            smc.OpenGesturesEnabled = True
            App.KeyController = smc
            nc.ShowPage(pg)
            b1.InitializeBitmap(KeepOriginalColors(LoadBitmap(File.DirAssets, "cart.png")), "left")
            'pg.TopLeftButtons = Array(smc.CreateBarButton("left"))
            'b1.TintColor = Colors.RGB(127,176,0)
            pg.TopLeftButtons = Array(b1)

and work without problem.
I would like to close the current activity and open an activity

so i tried:
B4X:
nc.RemoveCurrentPage
act_login.Show

But move the page act_login into inSideMenu as first page. I would like to close the window with the sidemenu and open a new one
Any suggestion ?
Thank you
 

MarcoRome

Expert
Licensed User
Longtime User
Yes so work:

B4X:
    Dim nc As NavigationController
    nc.Initialize("nc")
    Main.NavControl = nc
    App.KeyController = nc
    nc.RemoveCurrentPage
    act_due.Show
Thank you Erel
 
Upvote 0
Top