FMX Tips & Tricks – FireUI and a Frame

Delphi has a really neat feature called multi-device preview.

Essentially when you are building a mobile application in FMX you can see a preview on different device form factors whilst you are developing. This can save time as you don’t need to deploy to a physical device or emulator to verify your design.

Whichever of the available devices you are interested in, you can add to the multi-device preview, including iPhone and Android phones of different sizes.

The multi-device preview works with forms only.

fireui_err
Recently I began work on a mobile application, everything was going well, until I added a frame to my form. The multi-device preview suddenly stopped working.

The solution is very simple: in the multi-device preview panel, double-click on the devices you are interested in.

This creates views for your devices and adds resource imports to the form, such as: {$R *.iPhone55in.fmx IOS}

The views are now available from the view combo box, select them to make device specific changes to your design.

Another tip with using a frame: If you make changes to a frame, especially if you rename components which have event handlers, and your app stops working properly, remove the frame from its host and re-add it.

I hope this post helps. For more information on FireUI, please see the following webinar:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s