Android Question B4X menu item bar limits

Gfy

Member
Licensed User
Longtime User
Hi
I use this code to create a menu in B4X.

B4X:
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
When i add more then 3 icons as AddToBar, the code create a 3 point icon, and add the last 2 to the popup menu.
What can i do, to have more icons as AddToBar?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…