Created
September 29, 2013 00:42
-
-
Save stanch/6748144 to your computer and use it in GitHub Desktop.
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
// if screen width > 1000 dip, make layout horizontal, else make it vertical | |
l[LinearLayout](...) ~> (minWidth(1000 dp) ? horizontal | vertical) | |
// use different widget depending on screen width | |
(widerThan(1000 dp) ? w[BigTextView] | | |
widerThan(600 dp) ? w[MediumTextView] | | |
w[TextView]) ~> text("Gibberish") | |
// tweak a widget only if a condition is met | |
w[TextView] ~> text("Balderdash!") ~> (hdpi ? TextSize.large) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment