Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19256] Android: Expose setting renderPriority and layerType for Android WebView

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterMuhammad Ahmed Fahad
AssigneeUnknown
Created2015-06-29T02:46:28.000+0000
Updated2018-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

Comments

  1. Muhammad Ahmed Fahad 2015-07-27

    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.
  2. Muhammad Ahmed Fahad 2015-07-29

    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.
  3. Creative 2017-03-28

    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

JSON Source