1
votes

I'm updating my apps(Android, iOS) from Delphi 10 Seattle to Delphi 10.2 Tokyo. I have a few forms that use the transparency. I use this to create small popup like screens which still show part of previous form in the background underneath the transparent form.

My problem is now that forms that have transparency property set to True don't show at all. It seems like the original form that calls the transparent form is on top of it.

On Windows the form is running normally and on iOS I can see some components, and some are sized/positioned wrongly.

How can I solve this?

Code sample below:

procedure TForm1.Button1Click(Sender: TObject);
var
  FrmTransParentForm: TFrmTransParentForm;
begin
  inherited;
  FrmTransParentForm := TFrmTransParentForm.Create(nil);
  FrmTransParentForm.Show;
end;

procedure TFrmTransParentForm.Button1Click(Sender: TObject);
begin
  Close;
end;

procedure TFrmTransParentForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := TCloseAction.caFree;
end;

TFrmTransParentForm form is a plain form with only a button aligned in center of the screen and with form property transparency set to true.

1
Showing your code for showing the forms would improve your question.René Hoffmann
Do you see the problem only on Android and iOS, or also on, say, Windows? And do you see the problem also on new apps, or only on the one that you upgrade?Tom Brunberg
@TomBrunberg on Windows it works normal, on Android I don't see the form or any component at all and on iOS i see a some components. Some components on iOS are not sized correctly too.Remi
Then, Remi, please add that information to the question, it is significant. I spent useless time testing on Windows. Also my question which you did not yet answer, conserning new projects vs upgraded projects.Tom Brunberg
@TomBrunberg For a new project the button is shown but it is not clickable. When I turn transparency off the button is clickable. And my question did say Android/iOS not Windows.Remi

1 Answers

0
votes

I have the same issue. To display messages (showmessage style) I created a dedicated form with a label and an OK button. This form is created automatically when the application is opened. Sometimes, after the "show", it is not visible when it is active, ie all fields below are no longer accessible and if I press the RETURN button Phone, the fields become active again. All suggest that it's just a display problem. In the OnShow, I tried to specify BringToFront and I set the FormStyle property to StayOnTop.

I have the impression that this is a memory problem because when it happens, if I close all the applications on the mobile or reboot, the messages appear well.

This phenomenon appears on several mobile brands. Thanks Franck