Skip to content
Advertisement

get content html page with web view in android

I am working on an Android project in which I am loading an HTML page from the internet, not locally and then displaying it in WebView. It works fine, but unfortunately, when I click on any of the element in WebView, it opens the link in Browser.

What changes do I need to make so that any links clicked within the web-view will be opened by Web-view itself. Thank you.

JavaScript

Advertisement

Answer

Try to use setWebViewClient:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement