Hello

Hello,

How can I build custom dialogs box under Android ? I'm using "classic" forms displayed using the Showmodal method.

This is working but I don't like this approach as because my form doesn't behave like an native Android dialog box :

- when using the pop-up property, background isn't dimmed and the form is closed when user tap outside the dialog
- when not using the pop-up property, the form is maximized

I guess that my form need to use the ifmxdialogserviceasync interface and need to be registered... Problem is that I don't know how to do it and there is no example available on the net.

Can you gives me advices ? Is this the way to go ?

Thank you

Ps: I'm using Delphi Berlin and Android 4.4 device.

Comments

  1. You can do this using native development tools

    ReplyDelete
  2. David Heffernan​ of course this is doable with Android Studio but I'm using Rad Studio.

    ReplyDelete
  3. This is a consequence of the choice you made to use Delphi on mobile platforms. You give up native dialogs and controls. And instead you have single source that can target both iOS and Android. If you want native Android UI then you have chosen the wrong tool.

    ReplyDelete
  4. It is possible to use native dialogs in Android using Delphi. In fact, the FMX Android dialogs are just wrappers around the native dialogs; you just don't have as much control as if you did it yourself.

    In order to have more control, you'll need to be able to write Java code, because (as far as I have worked out so far) the native dialogs cannot be implemented directly in Delphi (I know for certain this is the case for various other Android classes).

    If you're not frightened off by now, I suggest downloading JADX from here:

    github.com - skylot/jadx

    And use it (jadx-gui.bat in the bin folder) to load up fmx.jar from the \lib\android\release folder under the root of your Delphi installation. Then browse around the code in com.embarcadero.firemonkey.dialogs

    ReplyDelete
  5. Eli M Thanks.. I should have remembered that, having looked at it only recently :-)

    ReplyDelete

Post a Comment