Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private AC As AppCompat
Private ToolBar As ACToolBarLight ' type needs to match view in Designer (i.e. ACToolBarDark or ACToolBarLight)
Private content As Panel
Private statusbar As Label
Private ULV As UltimateListView
Private ItemHeight As Int = 60dip
Private cellwidths() As Int
Private res As XmlLayoutBuilder
Dim pf As PreferenceManager
Private xml As XmlLayoutBuilder
Private button1 As Button
Private button2 As Button
Private spinner1 As Spinner
Private butmenu As ACPopupMenu
Private dcolorpicker As ColorPickerDialog
' Keyboard handling
Dim ime As IME
' Database
Dim dbcursor As Cursor
End Sub
Sub Activity_CreateMenu(menu As ACMenu)
' For this sub to work, make sure to include the If Java block for AC CreateOptionsMenu
Log("Activity_CreateMenu")
'ToolBar.InitMenuListener
menu.Clear
Log("adding menu items")
Dim item As ACMenuItem
Log("item as ACMenuItem created")
menu.Add2(10,4,"Add Item",xml.GetDrawable("ic_add_white_24dp")).ShowAsAction = item.SHOW_AS_ACTION_ALWAYS
'menu.Add2(20,3,"Edit List",xml.GetDrawable("ic_mode_edit_white_24dp")).ShowAsAction = item.SHOW_AS_ACTION_ALWAYS
Log("added menu icons")
menu.Add(1,1,"Settings",Null)
menu.Add(2,2,"About",Null)
menu.Add(3,3,"Reset DB",Null)
Log("added menu choices")
Log("adding toolbar")
' Call ToolBar.InitMenuListener and then use the ToolBar_NavigationItemClick event
'ToolBar.InitMenuListener
'ToolBar.Color =AC.GetThemeAttribute("colorPrimary")
'Dim AB As ACActionBar
'AB.Initialize
'AB.ShowUpIndicator = False
'AB.HomeVisible=True
'RefreshToolbarName
End Sub