Android Question Setting Menu Width in AppCompat example

Comalco

Member
Licensed User
Longtime User
Folks,
I enjoyed B4A years ago and haven't touched it for a few years. I am re-exploring it and have started writing an App for fun and learning based on the AppCompat examples. Could someone help me understand how to set the width of the menu created with the following code? The menu created is half the width of my phone display and could be much narrower in width for the words I am using in the menu.

B4X:
Sub Activity_CreateMenu(Menu As ACMenu)
    Menu.Clear
    Menu.Add(0, 0, "Overflow1", Null)
    Menu.Add(0, 0, "Overflow2", Null)
    Menu.Add(0, 0, "Overflow3", Null)
    Dim item As ACMenuItem = ACToolBarLight1.Menu.Add2(0, 0, "cart", Null)
    item.ShowAsAction = item.SHOW_AS_ACTION_ALWAYS
    UpdateIcon("cart", AddBadgeToIcon(cartBitmap, badge))
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…