我在 android 中使用进度条,但在钛中,它的活动指示器用于显示在 android 中后台发生的一些进度我的后台任务未完成 daisply 指示器并在完成后自动隐藏...我的活动指示器代码和我想在后台显示的任务如下..
var ind = Titanium.UI.createActivityIndicator({
location:Titanium.UI.ActivityIndicator.DIALOG,
//type:Titanium.UI.ActivityIndicator.DETERMINANT,
width:50,
height:50,
message: 'loading...',
color: 'FF0000'
});
curWin.add(ind);
ind.show();
and want to put below code which will be run on back ground.....
var image = imgvwPlus.image;
var filename = new Date().getTime() + "-ea.jpg";
bgImage = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory,filename);
// Write the image to the new file (image created from camera)
bgImage.write(image);
imageArray.length = imageArray.length + 1;
//alert(bgImage);
custom[j]={"hanger":btntext[0].title,
"color": btntext[1].title,
"size": btntext[2].title,
"text": btntext[3].title,
"textStyle": btntext[3].font.fontFamily,
"textSize": btntext[3].font.fontSize,
"textColor": btntext[3].color,
"textTop":textTop,
"textLeft":textLeft,
"quantity":quantity,
"price":price
};
imageArray[i]={"img_path":bgImage,
"imgPrice":imgPrice,
"customization":custom
};
index = i;
i++;
imgvwPlus.image = 'images/Plus.jpg';
btntext[0].title = 'Select';
btntext[1].title = 'Select';
btntext[2].title= 'Select';
btntext[3].title = 'Select';
btntext[3].font.fontFamily="Helvetica Neue";
btntext[3].font.fontSize="15";
btntext[3].color="#000";
var win = Ti.UI.createWindow({
title:'Popmount',
//url:'popmount.js',
param:imageArray,
index:index,
});
//alert("image path"+win.param[0].img_path);
Ti.UI.currentTab.open(win);