'On image click open URL in new browser not in the old webview

I'm loading URL on the webview with image

webView.loadUrl(url)

and I'm waiting then URL will finished

webView.webViewClient = object : WebViewClient() {
     override fun onPageFinished(view: WebView, url: String) {
         view.visibility = View.VISIBLE
         //do some staff          
     }
}

but then I'm clicking on the image, new link must be open, but I need to open it in new browser not in this webview. If I'm using without onPageFinished it does, but I need this onPageFinished. How can I open new URL on the image click in new browser?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source