Skip to content

Instantly share code, notes, and snippets.

@iskugor
Created March 6, 2012 14:20
Show Gist options
  • Save iskugor/1986524 to your computer and use it in GitHub Desktop.
Save iskugor/1986524 to your computer and use it in GitHub Desktop.
Titanium SDK ActivityIndicator issue
var win = Ti.UI.createWindow({
navBarHidden: true,
backgroundColor: '#000'
});
var button = Ti.UI.createButton({
title: 'Click me!'
});
var actInd = Ti.UI.createActivityIndicator({
height: 20,
width: 20
});
win.add(button);
button.addEventListener('click', function() {
var win1 = Ti.UI.createWindow({
backgroundColor: '#fc0',
layout: 'vertical',
navBarHidden: true,
modal: true
});
var buttonClose = Ti.UI.createButton({
title: 'Click to close!'
});
win1.add(buttonClose);
buttonClose.addEventListener('click', function() {
actInd.show();
win1.close();
setTimeout(function() { actInd.hide(); }, 200);
});
win1.open();
});
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment