Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save longton95/c66c5d2cdcbfd26ea7a89f3de8e8bee5 to your computer and use it in GitHub Desktop.
Save longton95/c66c5d2cdcbfd26ea7a89f3de8e8bee5 to your computer and use it in GitHub Desktop.
var win = Ti.UI.createWindow({
backgroundColor: '#ffffff',
navBarHidden: true,
exitOnClose: true
});
var button = Ti.UI.createButton({
title: 'Show Progress Dialog'
});
var progressIndicator = Ti.UI.Android.createProgressIndicator({
message: 'Loading...',
location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,
cancelable: true,
});
button.addEventListener('click', function (e) {
progressIndicator.show();
setTimeout(function () {
progressIndicator.hide();
setTimeout(function () {
progressIndicator.show();
}, 1);
}, 3000);
setTimeout(function () {
progressIndicator.hide();
}, 5000);
});
win.add(button);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment