开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜