2
I made a browser using Webview, but when I call loadUrl();
it opens the page in the default Android browser.
How do I open it inside my browser?
2
I made a browser using Webview, but when I call loadUrl();
it opens the page in the default Android browser.
How do I open it inside my browser?
3
You need to define where it will open, for example:
WebView myWebView = (WebView) rootView.findViewById(R.id.webView);
myWebView.getSettings().setJavaScriptEnabled(true);
myWebView.addJavascriptInterface(new MyJavaScriptInterface(), "HTMLOUT");
myWebView.setWebViewClient(new MyWebViewClient());
myWebView.getSettings().setUseWideViewPort(false);
myWebView.loadUrl(url);
This forces the URL to be opened in your XML declared Webview.
Hugs.
Browser other questions tagged java android webview
You are not signed in. Login or sign up in order to post.