[TIMOB-19256] Android: Expose setting renderPriority and layerType for Android WebView
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android |
Reporter | Muhammad Ahmed Fahad |
Assignee | Unknown |
Created | 2015-06-29T02:46:28.000+0000 |
Updated | 2018-02-28T19:55:59.000+0000 |
Description
Expose android webView attributes renderPriority and layerType so that we can gain some performance improvement on the webViews on Android.
Should be able to do something that translates to this native android code:
webview.getSettings().setRenderPriority(RenderPriority.HIGH);
webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
Kindly refer to this article:
http://stackoverflow.com/questions/7422427/android-webview-slow
Hello, Could this be given a higher priority? In essence, the App that I am working on works fine on iOS better than Android, but the main area where Titanium lets Android down is during the use of Table views and WebViews. Table views can be substituted with Scroll/List views, but as for WebViews there are places where it can't really be substituted.
renderPriority is deprecated and the layerType LAYER_TYPE_SOFTWARE or HARDWARE_ACCELERATED can be altered by setting borderRadius value. no borderRadius or borderRadius === 0 (Default), then the WebView is HARDWARE_ACCELERATED by default if borderRadius > 0, then layerType is LAYER_TYPE_SOFTWARE. Not ideal, but this Issue can be marked resolved.
Setting borderRadius in order to change the layerType seems like a fix nobody could ever guess. I suggest a higher priority. I'm running into errors on various devices, comparable to http://stackoverflow.com/questions/27444387/issue-on-openglrenderer-path-too-large-to-be-rendered-to-a-texture