Android Question B4XDrawerAdvanced StateChanged never fires

Cableguy

Expert
Licensed User
Longtime User
Hi guys,

I have this:

B4X:
Sub Class_Globals
    Private Root As B4XView
    Private xui As XUI
    Private MenuDrawer As B4XDrawerAdvanced
    Private MenuDrawerTimer As Timer
End Sub

Public Sub Initialize
    B4XPages.GetManager.LogEvents = True
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    MenuDrawerTimer.Initialize("MenuDrawerTimer", 5000)
    
    MenuDrawer.Initialize(Me, "MenuDrawer", Root, 300dip)
    MenuDrawer.CenterPanel.LoadLayout("MainPage")
    
    MenuDrawer.LeftPanel.LoadLayout("MenuDrawerLayout")

End Sub

Private Sub MenuDrawer_StateChanged (Open As Boolean)
    Log("drawer is " & Open)
    MenuDrawerTimer.Enabled = Open
End Sub

Private Sub MenuDrawerTimer_Tick
    MenuDrawer.LeftOpen = False
    Log("tic tic")
End Sub

The StateChanged event never gets called
 

Cableguy

Expert
Licensed User
Longtime User
Changing from B4XDrawerAdvanced to B4XDrawer (simple) solved my problem, no other changes needed but the lib declaration, so definitely something is wrong with the first one!
 
Upvote 0
Top