Android studio webview onback press - Joklinz-Tech

Latest

Home Of Tech news,jobs and android tutorials

Thursday, 25 January 2018

Android studio webview onback press



override fun onBackPressed() {
    val webview = findViewById<View>(R.id.webView2) as WebView
    if (webview.canGoBack()) {
        webview.goBack()
    } else {
        super.onBackPressed()
    }
}

No comments:

Post a Comment