I want to load an HTML <IFRAME>
inside an WebView
, but I don't know why, it is not able to do so.
I am using following code to load <IFRAME>
webView.loadData("<iframe src=\"http://www.google.com\"></iframe>", "text/html",
"utf-8");
Here's what I have tried.
WebSettings webViewSettings = webView.getSettings();
webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webViewSettings.setJavaScriptEnabled(true);
webViewSettings.setPluginsEnabled(true);
webViewSettings.setBuiltInZoomControls(true);
webViewSettings.setPluginState(PluginState.ON);
I have mentioned the internet permission:
<uses-permission android:name="android.permission.INTERNET" />
I have also tried settings the WebViewClient
with shouldOverrideUrlLoading
always returning false.
But it just isn't working.
I have tried this with diffrent sites, i.e. sites other than, google.com.
I am testing this on, Samsung Nexus S running ICS 4.0.3