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
This is how it worked out.
I noticed Log cat was throwing me
To fix this, I had to add
android:hardwareAccelerated="true"in<application>tag of Manifest.I was experiencing this on ICS and its found that the same issue will occur post Honeycomb devices.
Hope this will help some one out.