【发布时间】:2015-04-18 17:18:41
【问题描述】:
我的 android 手机(Samsung Galaxy S5、AT&T)刚刚从 Android 4.4 更新到 5.0,现在无法在 Titanium 中渲染 webviews。我有一个在 Android 4.4 上运行良好的已发布应用程序,现在在 5.0 中无法正确呈现(同一部手机,没有应用程序代码更改)。具体来说,似乎该窗口的默认画布自动具有巨大的高度和宽度(至少是屏幕大小的 4 倍),并且将 div 换行和格式化为绝对位置不起作用。以前,画布是屏幕的宽度,因此会发生自动换行,而窗口的高度是窗口中内容的高度。我用下面的合金代码在我的手机上重现了错误:
<Alloy>
<Window title="Test">
<WebView id="web1" html="<html><head></head><body><p>This is a long paragraph that should have word wrap once it reaches the right side of the screen, but unfortunately the new version of Android seems to be preventing this behavior, which is peculiar, as issues did not arise with prior versions of Android, as far as I can tell.</p></body</html>" class="webclass" backgroundColor="transparent" />
</Window>
</Alloy>
任何帮助将不胜感激。
【问题讨论】: