[AC-1114] Ti.UI.webview is not correctly displayed for some url
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-12-22T08:54:23.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | android |
Reporter | Siwei Shen |
Assignee | Radamantis Torres-Lechuga |
Created | 2015-12-18T07:36:49.000+0000 |
Updated | 2016-03-08T07:37:28.000+0000 |
Description
for some url, the webView doesn't work.
e.g. :
url = http://www.aoyou.com/domesticpackage/p31372i2
this doesn't work, the page is not shown.
Ti.UI.createWebView({
url: url
});
expected result: the web page shown
actual result: the web page is not shown. with no error message.
However, if we did the following coding way, it works ( added borderWidth and borderColor attributes)
Ti.UI.createWebView({
url: url,
borderWidth: 0,
borderColor: 'white'
});
Hello [~sg552], This is not a bug. It described in our [documentation](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView). Starting with Android 4.4 (API Level 19), the WebView component is based off of Chromium, introducing a number of changes to its rendering engine. By default, the Chromium WebView uses hardware acceleration, which may cause content to fail to render. If the WebView fails to render the content, the web view will clear itself, displaying only the default background color. The following log messages will be displayed in the console:
Which i observed in my test. To workaround this issue, you can enable software rendering by setting the webview's "borderRadius" property to a value greater than zero. This is platform default behavior. Thanks.
hi Sharif AbuDarda, thanks for your detailed explanation! I am very clear!