Android Question Persistent MsgBox2Async

colboy

Member
Licensed User
Longtime User
I've just converted an application using MsgBox2 to MsgBox2Async, to prevent the user pressing outside the dialog and having it cancel. Another problem a user noted was that if the machine goes to sleep with a dialog on the screen, when it awakes, the dialog disappears, I presume the DialagResponse.Cancel is actioned. Is there any way to prevent this. Ideally whenever a dialog appears, the user would like to ensure it remains, so that if a handheld is put down, and then later they resume work, whatever was on the screen remains, so they can pick up where they left off.

Any ideas?

Thanks, Colin
 

colboy

Member
Licensed User
Longtime User
Standard dialogs must be dismissed when the activity is paused. This is also the case with the non-async dialogs.

Switch to B4XDialog from XUI Views and don't add this code:
B4X:
Sub Activity_Pause (UserClosed As Boolean)
   Dialog.Close (XUI.DialogResponse_Cancel)
End Sub

The dialog will remain open.
Excellent, that works great. Most of the dialogs I'm using are simple yes, no questions. Is there an alternative way than using a LongTextTemplate, which allows way too much room for a simple question?
 
Upvote 0
Top