私はAndroidでプログレスバーを使用していますが、チタンでは、Androidでバックグラウンドで発生している進行状況を示すためのアクティビティインジケーターを使用していますが、チタンでは、バックグラウンドタスクを処理するためのコードをどこに書く必要がありますか?私のバックグラウンドタスクはデイジーインジケーターを終了せず、完了すると自動的に非表示になります...アクティビティインジケーターのコードとバックグラウンドで表示したいタスクは以下のとおりです。
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);