【发布时间】:2012-06-19 08:59:16
【问题描述】:
我想将图像显示为 toast 而不是纯文本消息。 我试过了:
try{
var toast = Titanium.UI.createNotification({
duration: Ti.UI.NOTIFICATION_DURATION_LONG,
background: '/images/img1.png'
});
toast.show();
}
catch (err)
{
alert(err.message);
}
应用程序在没有发出任何警报的情况下崩溃。我也试过:
try{
var toast = Titanium.UI.createNotification({
duration: Ti.UI.NOTIFICATION_DURATION_LONG,
message: 'text',
});
toast.setBackgroundImage('/images/img1.png');
toast.show();
}
catch (err)
{
alert(err.message);
}
但同样的问题。应用程序崩溃而不给出错误警报。有人知道如何在吐司中添加图像吗?
【问题讨论】: