Skip to content

Android Design Extensions 1.5 for Xojo 2023r3

The Android Design Extensions 1.5 are now available. This version works with Xojo 2023r3 and brings about 90 new extensions:

  • Declares for the new MobilePopupMenu
  • Declares for MobileMoviePlayer
  • Extensions for all MobileUIControl subclasses
  • New extensions for AndroidMobileTable
  • New extensions for MobileScrollableArea
  • New extensions for MobileSwitch
  • New extensions for MobileTabPanel
  • New extensions for MobileTextArea
  • New extensions for MobileTextField

Use MobilePopupMenu to Display it in Other Controls

The new MobilePopupMenu is a nice new addition to Xojo’s Android control library. Wouldn’t it be nice to display the popup menu when clicking on a Button or Canvas as well? With the Android Design Extensions you can achieve this.

  1. Create a new Android project
  2. Import the Android Design Extension folder into your project
  3. Add a MobilePopupMenu (PopupMenu1) from the library to Screen1
  4. Add some entries to the PopupMenu1 in the Inspector in the InitialValue section (say “Apple”, “Banana”, “Peach”)
  5. Set the Visible property of the PopupMenu1 to False
  6. Add a MobileButton (Button1) from the library to Screen1 and place it over the “invisible” PopupMenu1
  7. Add the Pressed-Event to Button1 with the following code:
Call PopupMenu1.PerformClickXC

8. Add the SelectionChanged-Event to the PopupMenu1 with the following code:

Button1.Caption = Me.SelectedRowText

9. Run your project by clicking Run.

You can use this technique with any control that you want to have a popup menu. For example, in a Canvas you would use the PointerDown-Event.

Feel free to take a look at the developer repository, create feature requests, and provide feedback on extending this extension library.

I’m happy to receive any voluntary financial support for the work I’ve done so far, which you are welcome to share here. You can download the project with many examples here.

Happy Coding.

Martin T. is a Xojo MVP and has been very involved in testing Android support.