I develop on Android using Delphi Firemonkey. The form

The form basically has only one visual component, which is always on the screen - the button. By clicking on it, the TToast component is used - infa

The problem is that when the message "toast" appears at the bottom (align - Bottom), it moves the button up (align - center), and the button does not return after the message disappears. I tried to change the Aligns, the TToast properties, the buttons - the result is the same.

    1 answer 1

    This happens because Toast itself is created invisible ( FLayout.Visible:=False ), and after the show it just becomes transparent, not being removed from the screen. Taking into account the fact that it is possible to set an alignment for a component - this is fundamentally incorrect behavior for quick notification, you should not use such a component. The appearance of the notification should not affect controls already existing on the form, much less change the position of the aligned (Align <> None).

    If you are working with android - use the Android.JNI.Toast.pas module from the same archive and its Toast procedure (did not test its functionality). If you need other platforms - look for alternatives, for example - FGX

    Another option is to write to the author of this component or correct the code yourself.

    • Thanks, I had to correct a drop of Android.JNI.Toast.pas to get the desired result, however, now all the components do not move up. Yes, and as I understand it, "toast" is displayed everywhere, which program would not be open. - danshat