Titanium appcelerator。 WebView不会显示。 Android的

时间:2012-01-26 13:41:53

标签: android webview titanium

我有以下代码:

app.js

Ti.include('logic/ui.js');
/* some code */

mainWindow.open();

ui.js

var mainWindow = Ti.UI.createWindow({
    title : 'Main Window',
    backgroundColor:'transparent',
    exitOnClose : true,
    backgroundImage: 'view/i/bg.png',   
 });

var resultWebView = Titanium.UI.createWebView({
    url : 'view/result.html',
    backgroundColor: 'transparent'
});
mainWindow.add(resultWebView);

问题:在使用Android<的设备上2.3.5,首次加载应用程序时不会加载WebView。但如果你应用缩放,它工作正常。关于如何解决这个问题的任何想法?

更新:

如果网络文档的网址是互联网网址,则WebView始终显示没有问题。

var resultWebView = Titanium.UI.createWebView({
    url : 'http://www.google.com',
    backgroundColor: 'transparent'
});

0 个答案:

没有答案