Last active
August 29, 2015 14:03
-
-
Save danang-altastratus/37633384060c73319ba6 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
/** | |
* Implementation of the window layout vertical & horizontal | |
* @author Danang Iswadi | |
*/ | |
var win = Ti.UI.createWindow({ | |
backgroundColor: 'black', | |
layout: 'vertical' | |
}); | |
if (Ti.Platform.Android) { | |
win.setNavBarHidden(true); | |
} else { | |
win.setNavBarHidden(false); | |
}; | |
var Title = Ti.UI.createLabel({ | |
top: 0, | |
height: 64, | |
width: Ti.UI.FILL, | |
backgroundColor: 'white', | |
text: 'Horizontal layout view', | |
color: 'black', | |
textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER | |
}); | |
var view1 = Ti.UI.createView({ | |
backgroundColor: 'red', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
var view2 = Ti.UI.createView({ | |
backgroundColor: 'white', | |
backgroundImage: '/images/appcelerator.png', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
var view3 = Ti.UI.createView({ | |
backgroundColor: 'green', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
var view4 = Ti.UI.createView({ | |
backgroundColor: 'white', | |
backgroundImage: '/images/alloy.png', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
var view5 = Ti.UI.createView({ | |
backgroundColor: 'blue', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
var view6 = Ti.UI.createView({ | |
backgroundColor: 'white', | |
backgroundImage: '/images/appcelerator-titanium.png', | |
left: 4, | |
height: 75, | |
width: 75, | |
top: 4 | |
}); | |
win.add(Title); | |
win.add(view1); | |
win.add(view2); | |
win.add(view3); | |
win.add(view4); | |
win.add(view5); | |
win.add(view6); | |
win.open(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment