Android WebView VS Phone Browser

后端 未结 4 1921
旧巷少年郎
旧巷少年郎 2020-11-30 01:53

I\'ve experienced a LOT of strange behaviours with using WebView in Android and I\'m wondering why there are so many diffrences between the W

4条回答
  •  孤城傲影
    2020-11-30 02:26

    The stock browser and WebView differs .Using all the tweaks like

        WebView browser;
    
        browser.clearFormData();
        browser.clearHistory();
        browser.clearCache(true);
    
        browser.getSettings().setAppCacheEnabled(true);
        browser.getSettings().setDatabaseEnabled(true);
        browser.getSettings().setDomStorageEnabled(true);
        browser.setWebChromeClient(new WebChromeClient());
    

    still it does not load high resolution images properly which is being loaded perfectly well by the android browser. Only part of the image can be visible on the webview screen which appears fully on normal android browser. This behavior is observed with latest Android 4X SDK as well. Which means android default browser significantly tweaks the webkit/webview code to show any url

提交回复
热议问题