Sub Globals
Private xui As XUI
Private dlg As MyDlg
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
Log("Back Pressed")
If dlg.Dialog.Visible Then
dlg.Dialog.Close(xui.DialogResponse_Cancel)
Return True
Else
Return False
End If
Else
Return False
End If
End Sub