Rey*_*ohn 4 android titanium-mobile
我在Android的app.js文件中有这个代码,在我的资源中有一个images文件夹:
var win = Titanium.UI.createWindow({
title : "my Name is Reyjohn",
backgroundColor : "#FFFFFF",
exitOnClose : true
})
var img = Titanium.UI.createImageView({
image:"images/Hypedin.png",
height:20,
width:30
});
win.add(img);
win.open();
Run Code Online (Sandbox Code Playgroud)
但它没有在背景中显示任何图像,我在哪里做错了?我是钛的新手,请帮忙
小智 6
尝试添加另一个/到路径,如:
image:"/images/Hypedin.png",
Run Code Online (Sandbox Code Playgroud)
您也可以尝试设置正确的定位:
top: 0,
left: 0
Run Code Online (Sandbox Code Playgroud)
你检查了日志/输出吗?有错误吗?
| 归档时间: |
|
| 查看次数: |
2576 次 |
| 最近记录: |