I have three Fragment. I have sent a String(URL) from third Fragment to the First Fragment. First Fragment has a webView . I want to show website on the webView which I passes from third fragment./ But I am facing one problem It shows me Dialog to choose one browser rather than showing the URl on the webview. This is the code.
String url="http://www.hotelsearcher.net/";
Bundle args = getArguments();
if (args != null){
url = args.getString("url");
}
// url=FragmentC.url;
WebView webView= (WebView) V.findViewById(R.id.webView1);
WebSettings webViewSettings = webView.getSettings();
webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webViewSettings.setJavaScriptEnabled(true);
webViewSettings.setPluginState(PluginState.ON);
webView.loadUrl(url);
把它放在webview中:
webViewSettings.setWebViewClient(new WebViewClient());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.