Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
Dim MenuItemsAll As List = B4XPages.GetManager.GetPageInfoFromRoot(Root).Parent.MenuItems
MenuItemsAll.Clear
mi = B4XPages.AddMenuItem(Me, "1")
mi.AddToBar = True
mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "bmpColor.bmp", 64dip, 64dip, False)
mi = B4XPages.AddMenuItem(Me, "2")
mi.AddToBar = True
mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "bmpColor.bmp", 64dip, 64dip, False)
mi = B4XPages.AddMenuItem(Me, "3")
mi.AddToBar = True
mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "bmpColor.bmp", 64dip, 64dip, False)
mi = B4XPages.AddMenuItem(Me, "4")
mi.AddToBar = True
mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "bmpColor.bmp", 64dip, 64dip, False)
Dim jo As JavaObject
jo.InitializeContext
jo.RunMethod("invalidateOptionsMenu", Null)
End Sub