iOS Question Button to Close SideMenuController not working

Alberto Iglesias

Well-Known Member
Licensed User
Using the SideMenuController the Button or any object in main page is disabled when Opened, is correct?

I can´t use a simple button or top left button to close the pageview? Only with gesture?

Like this example: when touch this button I can open the PageView, but to close, don´t work, only work with gesture.

I need to touch in this button (in opened PageView) to close.

 

Alberto Iglesias

Well-Known Member
Licensed User
Not Working....

A piece of code with pages constructions and SideMenu

B4X:
nc.Initialize("nc")
NavControl = nc
pageMenu.Initialize("pageMenu") : pageMenu.Title = "" : pageMenu.RootPanel.LoadLayout("layMenu")
pageInicial.Initialize("pageInicial") : pageInicial.Title = "" : pageInicial.RootPanel.LoadLayout("layPrincipal")
smc.Initialize(pageMenu, nc, Null)
smc.OpenGesturesEnabled = True
App.KeyController = smc
pageInicial.TopRightButtons = Array(smc.CreateBarButton("right"))
pageInicial.TopLeftButtons = Array(smc.CreateBarButton("left"))
nc.ShowPage(pageInicial)
nc.NavigationBarVisible = False
and I put to test
B4X:
Sub pageMenu_BarButtonClick (Tag As String)
LogColor("[pageMenu_BarButtonClick]" & Tag,Colors.Blue)
End Sub
Sub pageInicial_BarButtonClick (Tag As String)
LogColor("[pageInicial_BarButtonClick]" & Tag,Colors.Blue)
End Sub
but nothing.... not work!
 

Alberto Iglesias

Well-Known Member
Licensed User
Erel,

Now it´s working perfecly, my problem was put a imageview like a navigationbar button in the pageview and hidden the navigationbar.


One question:

Can I create this effects with SMC?

1) Control the limit of distance between X=0 and 100%X to put the main page to the left? (in this app below I can move the page to extremely right until 100%x)
2 and 3) look the top in both pages, is transparent with custom background

OBS: In SMC , when you move the main page the behavior is like elastic, it´s normal? Why in this another one this behavior is not elastic




Thanks

Alberto Iglesias
 

cloner7801

Active Member
Licensed User
Check the attached example.
I use this code but it dont work ..
What should I do ?
I use imageview to cose
B4X:
    Dim no As NativeObject = Main.smc
  
    If no.GetField("openSide").AsNumber <> 0 Then
        Main.smc.CloseMenu
        Return
    Else
    Main.smc.OpenRightMenu
    End If
 
Last edited:
Top