I think that, first, you should understand that the mobile environment is much more restrictive than the desktop environment, and not everything should be thought of the same way. Each one has its purpose!
I think that on a 5 inch screen, there wouldn't be much space for so many forms, wouldn't there?
If you want to have 2 forms on the same screen in a mobile environment, then you could try using a "container" to accommodate the two forms (otherwise, I don't think it would be feasible):
1) a form with a TLayout (myLayoutMain), for example (it would be your container) 2) inside "myLayoutMain", you could put 2 other layouts (myLayoutTop and myLayoutBottom) 3) now, create a form and place it inside "myLayoutTop", and another form inside "myLayoutBottom", for example
will it help?
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
in mobile, there is not exists "modal" way... you'll have that "simulating" this mode...
Android uses the whole screen to display forms (not Delphi). This is a pattern!
To show a Modal form, you need to direct all message calls from the operating system to the window with focus, so you need to hack the operating system to change this pattern.
Delphi has an overloaded "ShowModal( AModalResult:TModalResult)" procedure for use on Android, since DelphiX5, but it wasn't 100%... maybe now it is.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure TForm2.FormShow(Sender: TObject); begin // // does not works, because the O.S. Android usage all "screen space" to show your forms Modal or Non-Modal!!! // Self.Width := FScreenWidth; Self.Height := FScreenHeight; // Memo1.Lines.Add(Format('%dx%d', [Self.Width, Self.Height])); end;
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
procedure MyCloseMyForm2; begin // free all forms when end... or in any other situation necessary! for var F in MyForms do begin if (F <> nil) then F.DisposeOf; end; end;
procedure TForm1.Button1Click(Sender: TObject); var i: integer; begin // not use "FREE" in mobile!!! // i := length(MyForms); MyForms := MyForms + [TForm2.Create(self)]; // MyForms[i].FormShow(self); MyForms[i].Show; // (* ShowModal( { } procedure(AResult: TModalResult) begin case AResult of mrOK: ShowMessage('mrOK'); mrCancel: ShowMessage('mrCancel'); else ShowMessage('mr Else'); end; end); *) end;
procedure TForm1.FormDestroy(Sender: TObject); begin MyCloseMyForm2; end;
initialization
ReportMemoryLeaksOnShutdown := true;
end.
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
https://blog.marcocantu.com/blog/xe5_anonymous_showmodal_android.html
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
look, as I said: the O.S. do the form stay in full screen... not a Delphi!!!
if want "simulating" an overload: Form2 over Form1 ... like in MSWindows you need hack Android...
you can some like this: 0) put all components from Form1 into a TLayout ( layMainForm ) 1) in Form1 put other TLayout (layHidedToForm2 ) ... it should fill all client screen, and stay hided 2) create your Form2 with Parent = layHidedToForm2 3) before show Forn2, hide the layMainForm and show your layHidedToForm2 to see your Form2 4) at end, do the inverse sequence
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
调整窗口大小不起作用,因为操作系统。 Android 使用所有“屏幕空间”来显示您的表单模态或非模态!!!
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
TApplication use TFORM as your UI representant for user!
You can put it into a container like another TFORM, but you need changes some properties... as a MDI mode!!!
You can put a TForm into a TPANEL, or other container allowed!!! TLayout for example!
BUT the BIG PROBLEM IS: ANDROID ALWAYS USE A FORM IN FULL SCREEN!!!
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
You are using VCL concepts!!! This does not working in FMX!!!
you are trying put "Earth" into the "Moon"!!! it's not possible!
In Android NOT EXITS the "Modal concept"... all forms is a non-modal by default!!! always the "last form opened on the screen" stay on full screen in Android!!!
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3