机器人的WebView慢机器人、WebView

2023-09-12 21:31:33 作者:婊孑无情、戏孑无义

我的Andr​​oid webviews是缓慢的。这是一切从手机到平板电脑3.0+有足够多规格

My android webviews are slow. This is on everything from phones to 3.0+ tablets with more than adequate specs

我知道webviews应该是有限的,但我看到的Web应用程序做那些必须使用各种CSS3和jQuery巫术手机的差距,它们运行得很好,并迅速

I know that webviews are supposed to be "limited" but I see web apps done with phone gap that must be using all sorts of CSS3 and JQuery sorcery, they run just fine and speedy

所以我失去了一些东西,是有某种 myWebview.SPEEDHACK(1),我可以用它来加快速度?谢谢

so I'm missing something, is there some kind of myWebview.SPEEDHACK(1) that I can use to speed things up? Thanks

此外,有时我的web视图中的内容只是单纯的不加载缓慢加载,相反,它只是不会加载。我用来测试的资产存储在本地,没有错误。

also, sometimes the contents of my webview just simply don't load, instead of slowly loading, it just wont load. The asset I am testing with is stored locally, no errors.

推荐答案

试试这个:

webview.getSettings().setRenderPriority(RenderPriority.HIGH);
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);