How is TAndroidModule2 defined?
Pls show code of class definition?Edited: And think about inheritanse.
I would define the creation of the second form in event OnJNIPrompt of AndroidModule1 then call your second form show from a button click event in AndroidModule1.This creates the second form on start, allowing you to then to show the second form from your button without issue.Code: Pascal [Select][+][-]procedure AndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);begin if AndroidModule2 = nil then begin gApp.CreateForm(TAndroidModule2, AndroidModule2); AndroidModule2.Init; end;end;Code: Pascal [Select][+][-]procedure AndroidModule1.Button1Click(Sender: TObject);begin AndroidModule2.Show;end;
the second form is appearing with the components of the first form, that is, the second form appears with the button from the first form
Quote from: marcos-ebm on January 15, 2024, 08:29:11 amthe second form is appearing with the components of the first form, that is, the second form appears with the button from the first formChoose some background color for second form (change Background property of form). If you leave it at default, Android considers background as transparent and shows previous form underneath.