Is it possible to add three buttons on the back Keycode such as: Quit, Cancel, Restart in a MsgBox(2)?
Quit - would quit the application
Cancel - would return the user to the previous screen
Restart - would return the user to a specific view
I'm using the below as a starting point: All is working well as is - but cancel/no are almost the same thing and would like to replace one with a restart instead. I've tried modifying a few ways with no luck.
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
If Msgbox2("Do you want to close?", "", "Yes", "Cancel", "No", Null) = DialogResponse.POSITIVE Then
Return False
Else
Return True
End If
End If
End Sub
Thanks!
Quit - would quit the application
Cancel - would return the user to the previous screen
Restart - would return the user to a specific view
I'm using the below as a starting point: All is working well as is - but cancel/no are almost the same thing and would like to replace one with a restart instead. I've tried modifying a few ways with no luck.
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
If KeyCode = KeyCodes.KEYCODE_BACK Then
If Msgbox2("Do you want to close?", "", "Yes", "Cancel", "No", Null) = DialogResponse.POSITIVE Then
Return False
Else
Return True
End If
End If
End Sub
Thanks!