How to make links load or update in a web browser in android?

when I upload the url to the webview. It loads great.

but I touch anything in this web browser, it is redirected to the browser by default.

how to set the link to load in the same web browser.

thank.

+3
source share
1 answer

Deploy WebViewClientoverriding shouldOverrideUrlLoading()to tell Android what you want to do when you click the link. Attach WebViewClientto WebViewthrough setWebViewClient().

+3
source

Source: https://habr.com/ru/post/1732662/


All Articles