Created
May 4, 2020 14:48
-
-
Save longton95/c66c5d2cdcbfd26ea7a89f3de8e8bee5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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