Skip to content

Instantly share code, notes, and snippets.

@juniorz
Created May 30, 2011 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juniorz/998349 to your computer and use it in GitHub Desktop.
Save juniorz/998349 to your computer and use it in GitHub Desktop.
Hello Views (Linear Layout) using Droid DSL
/*
* HelloViews (Linear Layout)
* Based on: http://developer.android.com/resources/tutorials/views/hello-linearlayout.html
*/
application "Hello, Android!" => com.example.android.hellodroid {
screen HelloDroid {
# linear layout {
orientation: vertical;
# layout {
orientation: horizontal;
# textView: "red" {
gravity: center_horizontal;
background: #aa0000;
}
# textView: "green" {
gravity: center_horizontal;
background: #00aa00;
}
# textView: "blue" {
gravity: center_horizontal;
background: #0000aa;
}
# textView: "yellow" {
gravity: center_horizontal;
background: #aaaa00;
}
}
# layout {
orientation: vertical;
# textView: "row one" {
textSize: 15pt;
gravity: center_horizontal;
background: #aaaa00;
}
# textView: "row two" {
textSize: 15pt;
gravity: center_horizontal;
background: #aaaa00;
}
# textView: "row three" {
textSize: 15pt;
gravity: center_horizontal;
background: #aaaa00;
}
# textView: "row four" {
textSize: 15pt;
gravity: center_horizontal;
background: #aaaa00;
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment