Android WebView does not display web page
As stated in this post Android WebView does not display web page correctly I have tried javascript enable, but still not working. Have any idea, where i am wrong?
WebView wv = (WebView) findViewById(R.id.webview1);
WebSettings webSettings = wv.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setBuiltInZoomControls(true);
开发者_开发技巧 wv.loadUrl("http://www.google.com");
Add:
<uses-permission
android:name="android.permission.INTERNET"></uses-permission>
to your AndroidManifest.xml
if you haven't done so.
Also check if you have internet connection on your emulator. Try opening the Browser. If you do not have internet connection try to restart the emulator.
精彩评论