Ti.UI.WebView on Android: webpage is not being displayed

限于喜欢 提交于 2021-01-28 20:12:38

问题


I am using a WebView in my app. This WebView must display an external webpage. It works fine on iOS, but on Android I get a white screen.

In the console I see this warning: W/cr.BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid

I added debug messages inside the load event of the WebView. When I call the getHtml method there I see that the html is being retrieved. I have no idea why it is not being displayed?

I find some similar issues on stackoverflow (issues that were not related with Titanium) but this issues did not point me to a solution. Here is one of the issues I've found:

Android Webview: Cannot call determinedVisibility() - never saw a connection for the pid

I hope someone can point me in the right direction. Thanks in advance!!


回答1:


We have solved the problem for

BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid

and for

libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)

by using the following WebView for android: http://gitt.io/component/de.marcelpociot.webviewfragment , which contains fixes for : https://jira.appcelerator.org/browse/TIDOC-1548




回答2:


Try adding borderRadius: 1 to the Webview properties

var webview = Ti.UI.createWebView({url: '..', borderRadius: 1});

This disabled the hardware acceleration of the webview..

See the docs for more information: http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView



来源:https://stackoverflow.com/questions/34944007/ti-ui-webview-on-android-webpage-is-not-being-displayed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!