B4A Class [B4X] [XUI] AS Popup Menu

Alexander Stolte

Expert
Licensed User
Longtime User
do you think it would be possible to add an option to add more than 1 title to the pop up so tat we could maybe split the popup into sections?
The view is not designed for this, best is to use the advanced version, there you can decide what will be displayed.
 

Blueforcer

Well-Known Member
Licensed User
Longtime User
On iOS i think there is a small bug.Im using OpenMenuAdvanced.
B4X:
popup.OpenMenuAdvanced(60%x,LiveView.top,40%x)
If you open the menu it works, as long you dont choose anything, if you click on it, switching the B4Xscreen forth and back, the second click opens the menu very strange.

No problem on Android

 
Last edited:

iKingBob

New Member
How do you add an array of items to aspopupmenu..?

asp_main.AddItem(xpnl, Array(i)) - in a loop didn't work.

And I'm a noob to B4X ?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.13
    • Add AddMenuItemWithIcon
    • Add get IconProperties
    • Add get and set ItemHeight
 

JohnC

Expert
Licensed User
Longtime User
Can/How can this lib be used in a B4i Non-B4Xpages app?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Can/How can this lib be used in a B4i Non-B4Xpages app?
Yes:
For further questions, please make a new thread, thanks.
 
Last edited:

jahswant

Well-Known Member
Licensed User
Longtime User
Hello Alex, is there a simple way to make menu Item multi line in b4j like in other platforms?
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.15
    • B4I Improvements - the entire screen is now used for the background shadow
      • When the navigation bar was hidden, there was an area at the top that did not go dark when the menu was opened
      • The height of the area is now determined and the gap closed
      • B4XPages is now required in B4I
 

Mike1970

Well-Known Member
Licensed User
Longtime User
Hi,
I want to share a small bug-fix I made to the library (v.1.17)

I added an "initialization" check in the CloseMenu because without it the class would crash when the popup menu is re-initilialized before an "AutoHide procedure" completes.
B4X:
Public Sub CloseMenu
    If Not(background.IsInitialized) Or Not(xpnl_background.IsInitialized) Then Return
    
    xpnl_background.SetVisibleAnimated(CloseDurationMs,False)
    If xpnl_Triangle.IsInitialized = True Then xpnl_Triangle.Visible = False
    background.RemoveViewFromParent
    g_isOpen = False
End Sub
 

Attachments

  • ASPopupMenu.b4xlib
    7.8 KB · Views: 54
Cookies are required to use this site. You must accept them to continue using the site. Learn more…