Sub Globals
Private lstMenu As ListView
Private IME As IME
Private XUI As XUI
Private Root As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
IME.Initialize("ime")
'Define useable client area as a panel -------------------------------------------
Root = XUI.CreatePanel("")
Dim Content As Rect = IME.GetContentRect
Activity.AddView(Root, Content.Left, Content.Top, Content.Width, Content.Height)
IME.UpdatePercentageReference(Root.Width, Root.Height)
'Menu Code ------------------------------------------------------------------
Drawer.Initialize(Me, "Drawer", Root, 300dip) 'Init the Drawer to the root panel
Drawer.CenterPanel.LoadLayout("Main")
ToolbarHelper.Initialize
ToolbarHelper.ShowUpIndicator = True
Dim bd As BitmapDrawable
bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
ToolbarHelper.UpIndicatorDrawable = bd
ACToolBarLight1.InitMenuListener
Drawer.LeftPanel.LoadLayout("Left")
ACToolBarLight1.Title = AppTitle
Dim MenuOptions() As String = Array As String("First Option","Second Option","Third Option","Last Option")
For i = 0 To MenuOptions.Length -1
lstMenu.AddSingleLine(MenuOptions(i))
Next
End Sub