WebView & Device back button closes view

devjet

Member
Licensed User
Longtime User
Hello,
I have made myself a list of online magazines I regularly visit. If I visit the main page I can access atricles to read. Whne I then use the backbutton of my device the app goes back to the initial list of magazine selection. What i like to do is have a back button which takes me step by step all the way back I have navigated so far. How can this be done, or is there any sample somewhere available.
Thanks for any info!
 

Jack Cole

Well-Known Member
Licensed User
Longtime User
back button

Try this:

B4X:
Sub activity_KeyPress (KeyCode As Int) As Boolean 'return true if you want to consume the event
  Select keycode
     Case KeyCodes.KEYCODE_BACK: 
      page_back               
      Return True
  End Select
End Sub

Sub page_back
webview1.Back
End Sub

Jack
 
Upvote 0
Top