Last active
December 27, 2015 11:59
-
-
Save asiviero/7323029 to your computer and use it in GitHub Desktop.
Padding-like effect on Alloy/Titanium. Views are used as containers to produce an effect like padding using TSS positioning
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
"#element_container" : { | |
width : "200dp", | |
height : "200dp", | |
}, | |
"#element_padded" : { | |
top : "20dp", | |
bottom : "20dp", | |
left : "20dp", | |
right : "20dp", | |
width : Ti.UI.FILL, | |
height : Ti.UI.FILL, | |
} |
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"> | |
<View id="element_container"> | |
<View id="element_padded" /> | |
</View> | |
</Window> | |
</Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment