Android Question [Solved] [B4XPages] addmenuitem dropdown

AymanA

Active Member
Licensed User
Hi All,

I have an icon on menu bar added with the code below:
B4X:
Dim mi As B4AMenuItem
    mi = B4XPages.AddMenuItem(Me,"Lang")
    mi.AddToBar = True
    mi.Bitmap = xui.LoadBitmapResize(File.DirAssets, "lang.png", 70dip, 70dip, True)

What I am after, is that when this icon is pressed, a drop down menu is opened so I can have number of selections.

I have tried to use droppy library https://www.b4x.com/android/forum/threads/droppy-dropdown-menu.81918/

But I am not sure how to use it with an icon on menu, since droppy is expecting to receive Anchor as view.

So anyone can help directing me on how can I add the drop down to a menu icon?

I have researched the forum but couldn't find an answer or example for that.

Thank you for your help!
 

DonManfred

Expert
Licensed User
Longtime User
Android Menu does not support Submenues.

Droppy is not relevant here. It has nothing to do with Activity Menuitems.
 
Upvote 0

AymanA

Active Member
Licensed User
Thank you so much DonManfred for ur help and the great Droppy library! :)

I was curious to know if I can have any dropdown on an icon, but now I understand thanks to you!

I will create a hidden button directly under my icon and trigger it from there then.

I appreciate ur help!
 
Upvote 0
Top