Android Question Translating an old app tp B4XPAges: How to Add More Menus?

GuyBooth

Active Member
Licensed User
Longtime User
In my old app I had three menus with icons at the top of my main activity screen. The first two had icons I provided, the last one had its three items under the three dots icon.
They were added using the following code:
B4X:
    ' Activity Bar Menu Item for VoiceControl:
    Activity.AddMenuItem3("VoiceControl","Toggle_VoiceControl",LoadBitmapResize(File.DirAssets, "icon-microphone-live 32x32.png",28dip,28dip, True),True)
    ' Activity Bar Menu Item for connections:
    Activity.AddMenuItem3("Connections","Select_WirelessMethod",LoadBitmapResize(File.DirAssets, "icon-communication 32x32.png",28dip,28dip, True),True)
    ' Regular menu items:
    Activity.AddMenuItem("Collections","CollectionsMenu")
    Activity.AddMenuItem("Update Database","UpdateDB")
    Activity.AddMenuItem("Temporary Settings","TempSettings")
I understand how to add the last three items under the three dots using B4XPages.AddmenuItem(Me,"Collections") etc, but I can't find any reference to a method to add the other two. Can someone poit me in the right direction? AddMenuItem3 is not an option with B4XPages.
 

GuyBooth

Active Member
Licensed User
Longtime User
Needed to play around with it to understand it, but this works.
I was able to access an individual item in the list of menus and change its bar icon without removing all the items and rebuilding.
 
Upvote 0
Top