if(!Ti.Network.online) {
var dialog = Ti.UI.createAlertDialog({
message : 'ネットワークに接続されていません。接続後に再度お試しください。',
buttonNames : ["OK"]});
dialog.show();
return;
}
//以降、ネットワークに接続する処理・・・
for root, dirs, files in os.walk(os.path.join(self.top_dir, "Resources")): for f in files: path = os.path.join(root, f) if is_resource_drawable(path) and f != 'default.png': fileset.append(path)下記のように追加(2行目、3行目、5行目):
for root, dirs, files in os.walk(os.path.join(self.top_dir, "Resources")): for name in ignoreDirs: if name in dirs: dirs.remove(name) for f in files: if f in ignoreFiles: continue path = os.path.join(root, f) if is_resource_drawable(path) and f != 'default.png': fileset.append(path)
var win = Ti.UI.createWindow(); // create an imageview and set it to the width and height of your images var loaderImage = Ti.UI.createImageView({ width:54, height:54 }); // add it to your window win.add(loaderImage); // set the length of the images you have in your sequence var loaderArrayLength=12; // initialize the index to 1 var loaderIndex=1; // this function will be called by the setInterval function loadingAnimation(){ // set the image property of the imageview by constructing the path with the loaderIndex variable loaderImage.image = "images/loader-sequence/frame" + loaderIndex + ".png"; //increment the index so that next time it loads the next image in the sequence loaderIndex++; // if you have reached the end of the sequence, reset it to 1 if(loaderIndex===13)loaderIndex=1; } // start the setInverval -- adjust the time to make a smooth animation var loaderAnimate = setInterval(loadingAnimation,80); win.open();