I have a Gallery which contains WebView’s as its children, when I scroll the Gallery I am getting the following warning,
'04-07 19:35:37.409: WARN/webcore(664): Can't get the viewWidth after the first layout
04-07 19:35:37.470: WARN/webcore(664): skip viewSizeChanged as w is 0'
What does this warning refer to ? [I have not hardcoded any of the Layout params.]
Any light on why this warning occurs would be really helpful…
and these were printed too
04-15 11:10:13.202: DEBUG/webviewglue(617): nativeDestroy view: 0x257f40
04-15 11:10:13.243: DEBUG/webviewglue(617): nativeDestroy view: 0x25d680
04-15 11:10:13.292: DEBUG/webviewglue(617): nativeDestroy view: 0x240688
04-15 11:10:13.332: DEBUG/webviewglue(617): nativeDestroy view: 0x249918
04-15 11:10:13.373: DEBUG/webviewglue(617): nativeDestroy view: 0x226608
04-15 11:10:13.423: DEBUG/webviewglue(617): nativeDestroy view: 0x21e418
04-15 11:10:13.482: DEBUG/webviewglue(617): nativeDestroy view: 0x23a4e8
04-15 11:10:13.533: DEBUG/webviewglue(617): nativeDestroy view: 0x235c68
04-15 11:10:13.572: DEBUG/webviewglue(617): nativeDestroy view: 0x212a28
Thanks in advance.
I’ve had the same problem my normal webview wouldn’t work and gave me the same error as you have described.
As I understand it this has to do with Android zoom which newer devices allows in order to avoid applications (designed for phones) appear as small window applications on e.g. tablets.
My solution:
the last line setBuiltInZoomControls(true) made the issue disappear for me.
I hope this helps you!
[EDIT] This solution worked fine for me yesterday, however this morning I got the error again. This is probably not the solution. Sorry for misleading post.
[EDIT2] Now I have changed my code and I haven’t experienced the error again after that, I ran a test suite of 1000 iterations without fault. What solved my problem was that the url wasn’t passed correctly to the webview. It got an empty string, after making sure that a correct url the problem disappeared. Hopefully this will help someone.