Jun 16, 2020 Replies: 2 B4A project is attached. By default, when a B4XDialog is shown it will close other visible dialogs. This is prevented with this line: Code: Copy Dim rs As Object = MainDialog.ShowCustom(CustomPanel, "Ok", "", "") MainDialog.Base.Parent.Tag = "" 'this will prevent the dialog from closing when the second dialog appears. Wait For (rs) Complete (Result As Int) The other interesting thing is how to handle the back key: Code: Copy Sub B4XPage_CloseRequest As ResumableSub For Each d As B4XDialog In Array(SecondDialog, MainDialog) 'order is important. Should start from the nested dialog. If d.Visible Then d.Close(xui.DialogResponse_Cancel) Return False 'don't close the page End If Next Return True End Sub Attachments NestedB4XDialogs.zip NestedB4XDialogs.zip 10.9 KB · Views: 1,224 Click to expand...
B4A project is attached. By default, when a B4XDialog is shown it will close other visible dialogs. This is prevented with this line: Code: Copy Dim rs As Object = MainDialog.ShowCustom(CustomPanel, "Ok", "", "") MainDialog.Base.Parent.Tag = "" 'this will prevent the dialog from closing when the second dialog appears. Wait For (rs) Complete (Result As Int) The other interesting thing is how to handle the back key: Code: Copy Sub B4XPage_CloseRequest As ResumableSub For Each d As B4XDialog In Array(SecondDialog, MainDialog) 'order is important. Should start from the nested dialog. If d.Visible Then d.Close(xui.DialogResponse_Cancel) Return False 'don't close the page End If Next Return True End Sub
M Mostez Well-Known Member Licensed User Longtime User Jun 16, 2020 #2 I tried your example, but I got this error message: B4A Version: 9.90 BETA #2 Java Version: 8 Parsing code. (0.08s) Building folders structure. (0.04s) Compiling code. Error Error compiling program. Error description: Unknown member: activity_actionbarhomeclick Error occurred on line: 32 B4XPages.Delegate.Activity_ActionBarHomeClick Word: activity_actionbarhomeclick
I tried your example, but I got this error message: B4A Version: 9.90 BETA #2 Java Version: 8 Parsing code. (0.08s) Building folders structure. (0.04s) Compiling code. Error Error compiling program. Error description: Unknown member: activity_actionbarhomeclick Error occurred on line: 32 B4XPages.Delegate.Activity_ActionBarHomeClick Word: activity_actionbarhomeclick
Erel B4X founder Staff member Licensed User Longtime User Jun 16, 2020 #3 Update to v9.90: https://www.b4x.com/b4a.html