Android Question B4XPages menuitem delete

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

I am unable to delete a menu item in B4XPages with the following code. Can anyone identify what might be wrong?
B4X:
 #if b4a
 Dim menus As List = B4XPages.GetManager.GetPageInfoFromRoot(Root).Parent.MenuItems
menus.Clear
 #End If

how i add menu item

B4X:
    'add menu items
Dim mi As B4AMenuItem = B4XPages.AddMenuItem(Me, "Save")
mi.AddToBar = True

Dim ctxt As JavaObject
ctxt.InitializeContext
ctxt.RunMethod("invalidateOptionsMenu", Null)
 
Top