开发者

Android WebView does not display web page

开发者 https://www.devze.com 2023-03-23 03:16 出处:网络
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?

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

精彩评论

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