Answer the question
In order to leave comments, you need to log in
How to speed up WebView?
There is a site in it there is a 3D walk section created using Js, so I connected to it via
Webview, but the thing is, there are brakes moving very slowly ... is it possible to speed it up somehow?
// Enable Javascript WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); //metodi optimizacii mWebView.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH); mWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); mWebView.getSettings().setAppCacheEnabled(true); mWebView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); webSettings.setDomStorageEnabled(true); webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); webSettings.setUseWideViewPort(true); webSettings.setSavePassword(true); webSettings.setSaveFormData(true); webSettings.setEnableSmoothTransition(true); // Force links and redirects to open in the WebView instead of in a browser mWebView.setWebViewClient(new WebViewClient());
Answer the question
In order to leave comments, you need to log in
Alas, real-time rendering through WebView is not particularly friendly with performance, and also on mobile. device.
The best option to ensure proper performance is to rewrite under the NDK
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question