Created
November 22, 2012 21:49
-
-
Save ricardoalcocer/4133046 to your computer and use it in GitHub Desktop.
Basic Alloy : Opening Windows
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
function showWin1(e) { | |
var w=Alloy.createController('win2').getView(); | |
w.open(); | |
} | |
$.index.open(); |
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
".container": { | |
backgroundColor:"white" | |
}, | |
"#Label": { | |
width: Ti.UI.SIZE, | |
height: Ti.UI.SIZE, | |
color: "#000" | |
} |
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
<Alloy> | |
<Window class="container"> | |
<Label id="label" onClick="showWin1">I'm Window 1</Label> | |
</Window> | |
</Alloy> |
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
function closeme(){ | |
$.container.close(); | |
} |
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
"#container":{ | |
backgroundColor: "#000" | |
}, | |
"#thelabel":{ | |
height: Ti.UI.SIZE, | |
width: Ti.UI.SIZE, | |
color: "#fff" | |
} |
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
<Alloy> | |
<Window id="container"> | |
<Label id="thelabel" onClick="closeme">I'm Window 2</Label> | |
</Window> | |
</Alloy> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment