Drop Down Menu?

Would It be possible to press a button that brings up a drop down menu with regular buttons and change the text on them, and then set a different function for each of them? Thanks

Like This?

1 Like

You can use this extension.

"items" is a list of items that will be shown on the popup menu. "id" can be any whole/integer number.

To react to the user clicking on an item, use this.

3 Likes

Thank you.

Can you show me the blocks?

To use drop down menu, we need an extension
Blocks :point_down:


If you dont want to use extension, you can use spinner :point_down:

AIA To Test :point_down:
dropdown.aia (24.2 KB)

1 Like

Spinner is not a perfect drop-down, it might show the items on a “dialog” in some types of phones (like mine). It is better to use an extension instead.

2 Likes

Exactly :ok_hand:
But some people don't like to use an extensions

When I click the button it gives me the error, probably because I had no blocks to show the list items itself. I tried these blocks (photo attached) but it didn't work.

Set the Anchor in the designer section to your button
And
Use this to show your dropdown menu:

When button1 click
call UrsAI2popup.Show


It still doesn't work

Hello Alexander1

Did you anchor a button to the pop-up via the Designer Properties Palette?
Snap097

Or you can anchor via the Blocks:
blocks

The extension developer has posted a lot of information on his website:
https://ullisroboterseite.de/android-AI2-Popup.html#down

2 Likes

Check this out!

I think no

Thanks, this worked perfectly.