Skip to content

Instantly share code, notes, and snippets.

@asiviero
Last active December 27, 2015 11:59
Show Gist options
  • Save asiviero/7323029 to your computer and use it in GitHub Desktop.
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
"#element_container" : {
width : "200dp",
height : "200dp",
},
"#element_padded" : {
top : "20dp",
bottom : "20dp",
left : "20dp",
right : "20dp",
width : Ti.UI.FILL,
height : Ti.UI.FILL,
}
<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