我想在WebView
中加載HTML <IFRAME>
,但我不知道爲什麼,它不能這樣做。帶有IFRAME的WebView android
我使用下面的代碼加載<IFRAME>
webView.loadData("<iframe src=\"http://www.google.com\"></iframe>", "text/html",
"utf-8");
這是我都試過了。
WebSettings webViewSettings = webView.getSettings();
webViewSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webViewSettings.setJavaScriptEnabled(true);
webViewSettings.setPluginsEnabled(true);
webViewSettings.setBuiltInZoomControls(true);
webViewSettings.setPluginState(PluginState.ON);
我已經提到上網權限:
<uses-permission android:name="android.permission.INTERNET" />
我也曾嘗試設置與WebViewClient
總是shouldOverrideUrlLoading
返回false。
但它只是不工作。
我試過這個不同的網站,即google.com以外的網站。
我測試此上,三星Nexus S運行ICS 4.0.3
嗨,什麼這個機器人:硬件加速= 「真」意味着什麼? –
@Shardul:看到截圖:http://i.imgur.com/OyCxlwh.png,hardwareAccelerated = true已設置,但iframe無法加載google.com頁面 – YumYumYum
在此android:hardwareAccelerated =「true」屬性不是在應用程序標籤中找到 – SAndroidD