Android Question Go back in WebView

Mynak

New Member
B4XMainPage:
Sub Class_Globals
    Private xui As XUI
    Private WebView1 As WebView
    Private wve As WebViewExtras
    Private wvs As WebSettings
    Dim IME As IME
End Sub

Public Sub Initialize
    IME.Initialize("IME")
    IME.AddHeightChangedEvent
End Sub

Sub B4XPage_Created (Root1 As B4XView)
    Root1.LoadLayout("ningen")
    WebView1.LoadUrl("https://website.com")
    wve.Initialize(WebView1)
    wvs = wve.GetSettings
    wvs.SetDOMStorageEnabled(True)
End Sub


Main:
#Region  Project Attributes
    #ApplicationLabel: Ningen
    #VersionCode: 1
    #VersionName: 1.0
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: False
#End Region

Sub Process_Globals
    Public ActionBarHomeClicked As Boolean
End Sub

Sub Globals
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Dim pm As B4XPagesManager
    pm.Initialize(Activity)
End Sub

Sub Activity_ActionBarHomeClick
    ActionBarHomeClicked = True
    B4XPages.Delegate.Activity_ActionBarHomeClick
    ActionBarHomeClicked = False
End Sub

Sub Activity_KeyPress (KeyCode As Int) As Boolean
    Return B4XPages.Delegate.Activity_KeyPress(KeyCode)
End Sub

Sub Activity_Resume
    B4XPages.Delegate.Activity_Resume
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    B4XPages.Delegate.Activity_Pause
End Sub

Sub Activity_PermissionResult (Permission As String, Result As Boolean)
    B4XPages.Delegate.Activity_PermissionResult(Permission, Result)
End Sub

Sub Create_Menu (Menu As Object)
    B4XPages.Delegate.Create_Menu(Menu)
End Sub

#if Java
public boolean _onCreateOptionsMenu(android.view.Menu menu) {
    processBA.raiseEvent(null, "create_menu", menu);
    return true;
}
#End If
#End Region

I want to return to the site in the webview when trying to return with the phone's own return key.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…