Last active
December 14, 2015 06:54
-
-
Save rakhimoni/6f4e86136e8f7a4c6475 to your computer and use it in GitHub Desktop.
Android Antivity Indicator
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
Ti.UI.backgroundColor = 'white'; | |
var win1 = Ti.UI.createWindow({ | |
backgroundColor: 'white', | |
}); | |
var win2 = Ti.UI.createView({ | |
backgroundColor: 'pink', | |
height:'300', | |
width:'300', | |
}); | |
win1.add(win2); | |
var activityIndicator = Ti.UI.createActivityIndicator({ | |
color: 'green', | |
font: {fontFamily:'Helvetica Neue', fontSize:26, fontWeight:'bold'}, | |
message: 'Loading...', | |
//style: Ti.UI.ActivityIndicatorStyle.DARK, | |
top:10, | |
left:10, | |
height:Ti.UI.SIZE, | |
width:Ti.UI.SIZE | |
}); | |
// The activity indicator must be added to a window or view for it to appear | |
win2.add(activityIndicator); | |
// eventListeners must always be loaded before the event is likely to fire | |
// hence, the open() method must be positioned before the window is opened | |
activityIndicator.show(); | |
win1.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment