Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private Button1 As Button
Dim FakeActionBar, UnderActionBar As Panel
Dim PanelWithSidebar As ClsSlidingSidebar
Dim lvMenu As ListView
Dim lblInfo As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("test")
Button1.SetBackgroundImage(LoadBitmap(File.DirAssets, "menu.png"))
' Dim BarSize As Int: BarSize = 60dip
' FakeActionBar.Initialize("")
' FakeActionBar.Color = Colors.RGB(20, 20, 100) 'Dark blue
' Activity.AddView(FakeActionBar, 0, 0, 100%x, BarSize)
''
' Dim LightCyan As Int: LightCyan = Colors.RGB(0, 95, 170)
' UnderActionBar.Initialize("")
' UnderActionBar.Color = LightCyan
' Activity.AddView(UnderActionBar, 0, BarSize, 100%x, 100%y - BarSize)
''
' PanelWithSidebar.Initialize(UnderActionBar, 190dip, 2, 1, 500, 500)
' PanelWithSidebar.ContentPanel.Color = LightCyan
' PanelWithSidebar.Sidebar.Background = PanelWithSidebar.LoadDrawable("popup_inline_error")
' PanelWithSidebar.SetOnChangeListeners(Me, "Menu_onFullyOpen", "Menu_onFullyClosed", "Menu_onMove")
'
' lvMenu.Initialize("lvMenu")
' lvMenu.AddSingleLine("1st option")
' lvMenu.AddSingleLine("2nd option")
' lvMenu.AddSingleLine("3rd option")
' lvMenu.SingleLineLayout.Label.TextColor = Colors.Black
' lvMenu.Color = Colors.Transparent
' lvMenu.ScrollingBackgroundColor = Colors.Transparent
' PanelWithSidebar.Sidebar.AddView(lvMenu, 20dip, 25dip, -1, -1)
'
'' lblInfo.Initialize("")
'' lblInfo.Text = "Click the button to open/close the sliding menu."
'' lblInfo.TextColor = Colors.Black
'' lblInfo.TextSize = 24
'' PanelWithSidebar.ContentPanel.AddView(lblInfo, 30dip, 30dip, 100%x - 60dip, 100%y - 60dip)
'
'' btnMenu.Initialize("")
'' btnMenu.SetBackgroundImage(LoadBitmap(File.DirAssets, "menu.png"))
' FakeActionBar.AddView(Button1, 100%x - BarSize, 0, BarSize, BarSize)
' PanelWithSidebar.SetOpenCloseButton(Button1)
End Sub