Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
Dim result As Int
result = Msgbox2("Exit App?", "", "yes", "", "no", Null)
If result = DialogResponse.POSITIVE Then
Activity.Finish
Else If result = DialogResponse.NEGATIVE Then
End If
Return True
Else
Return False
End If
End Sub
Sub Activity_KeyPress(KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If webview1.Url = "index.html" Then
Activity.Finish
Else
webview1.LoadUrl("index.html")
'or
webview1.Back
End If
Return True
End If
Return False
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
Dim result As Int
result = Msgbox2("Exit App?", "", "yes", "", "no", Null)
If result = DialogResponse.POSITIVE Then
Activity.Finish
Else If result = DialogResponse.NEGATIVE Then
End If
Return True
Else
Return False
End If
End Sub
Sub Activity_KeyPress(KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
If webview1.Url = "index.html" Then
Activity.Finish
Else
webview1.LoadUrl("index.html")
'or
webview1.Back
End If
Return True
End If
Return False
End Sub