Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiDemoFiremonkeyIOS

Build A Dialog Like UIActivityIndicatorView For Delphi XE5 Firemonkey

Delphi XE5 Firemonkey Working DialogI put together a demo of a Working Dialog form for Delphi XE5 Firemonkey mobile projects. I mainly built it for IOS to look like UIActivityIndicatorView but I’ve modified it so that it also works on Android. Basically it has a form called TWorkingForm that you can display any time you want to do an operation that may freeze up the app. The dialog is designed to look like the native IOS working dialog. The Transparency property is set to True and the BorderStyle is set to bsNone on the TWorkingForm. On IOS this allows you to have a transparent form that floats over your main form. The main reason why you would want to use a form like this instead of just having a TLayout on your main form is because of TWebBrowser or any other native control. TWebBrowser wraps around UIWebView which hovers over your form and above any TLayout as far as I can tell. This also applies to any of the native controls from TMS iCL. When you use the TWorkingForm dialog it will be above the TWebBrowser. For Android I couldn’t get the transparent form working so instead it takes a screenshot using MakeScreenShot and uses that as the background of TWorkingForm. You could take the WorkingPanel which is a TRectangle from the TWorkingForm and just add it to your own project if you don’t use any native controls that it has to float over. Here is the function that you can use to call TWorkingForm:

In the demo the example work is a TRESTClient that uses ExecuteAsync. When ExecuteAsync comes back in the OnAfterExecute event you hide the TWorkingForm. I did not use an extra thread to make this TWorkingForm happen (check out our other post for a multithreaded working dialog). You could combine this working form with the multithreaded working form to get the best of both.

Download The Delphi XE5 Firemonkey Working Dialog Demo

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply