I have a webview as part of an app and use the back key to backup up through the previously displayed pages - pretty straight forward. However, when there are no more previously displayed webpages to display, how can I get the app to close when I click the back button again? Commercial browsers behave this way. Is there a way to check if there are no more pages to display and control the exit that way? I have a menu button to exit app but would like the back key to do it if it is possible.
Sub activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
WebView1.Back
Return True
End If
End Sub
Sub activity_KeyPress (KeyCode As Int) As Boolean
If KeyCode = KeyCodes.KEYCODE_BACK Then
WebView1.Back
Return True
End If
End Sub