Created
March 8, 2011 12:30
-
-
Save sevir/860220 to your computer and use it in GitHub Desktop.
Progress window in Titanium cross mobile
This file contains hidden or 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
function showIndicator() | |
{ | |
// window container | |
indWin = Titanium.UI.createWindow({ | |
height:150, | |
width:150 | |
}); | |
// black view | |
var indView = Titanium.UI.createView({ | |
height:150, | |
width:150, | |
backgroundColor:'#000', | |
borderRadius:10, | |
opacity:0.8 | |
}); | |
indWin.add(indView); | |
// loading indicator | |
actInd = Titanium.UI.createActivityIndicator({ | |
style:Titanium.UI.iPhone.ActivityIndicatorStyle.BIG, | |
height:30, | |
width:30 | |
}); | |
indWin.add(actInd); | |
// message | |
var message = Titanium.UI.createLabel({ | |
text:'Loading', | |
color:'#fff', | |
width:'auto', | |
height:'auto', | |
font:{fontSize:20,fontWeight:'bold'}, | |
bottom:20 | |
}); | |
indWin.add(message); | |
indWin.open(); | |
actInd.show(); | |
} | |
function hideIndicator() | |
{ | |
actInd.hide(); | |
indWin.close({opacity:0,duration:500}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment