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.

2 Responses to Build A Dialog Like UIActivityIndicatorView For Delphi XE5 Firemonkey

  1. Pingback: Ten Tips For Creating Professional Android Apps With Delphi XE5 Firemonkey | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  2. Pingback: Ten Tips For Creating Professional Android Apps With Firemonkey | Firemonkey X

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Configure The Settings.bundle For Your Delphi XE5 Firemonkey App On IOS

On IOS devices there is a special Settings app that your Delphi XE5 Firemonkey application can take advantage of and...

Close