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?
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?
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 declared WebView in XML.
Hugs.