Android Question B4xpage webview

hitesh.k

Member
Hello there its my first post so probably what i am asking is going to put smile on your face. so here is senerio in which i need help i have a webview which load my website all fine but at pressing back key app minimize ,what i want is it should go back to previous page and if i reached at landing page it should exit at double press of back key any help i can get.
 

hitesh.k

Member
B4X:
Private Sub B4XPage_CloseRequest As ResumableSub
       If WebView1.Url=("https://your home page url/")Then
       Dim sf As Object = xui.Msgbox2Async("Exit?", "Do you want to exit ", "Yes", "Cancel", "No", Null)
        Wait For (sf) Msgbox_Result (Result As Int)
        If Result = xui.DialogResponse_Positive Then
            Return True
        End If
    End If
    WebView1.Back

    Return False
    End Sub
thanks Erel for responding and code after little modification it works
 
Upvote 0
Top