Skip to content

Instantly share code, notes, and snippets.

@jeremyhaile
Created April 7, 2011 15:08
Show Gist options
  • Save jeremyhaile/907956 to your computer and use it in GitHub Desktop.
Save jeremyhaile/907956 to your computer and use it in GitHub Desktop.
Example of an android XML file in HAML
!!! XML
- xmlns = {"xmlns:android" => "http://schemas.android.com/apk/res/android"}
- id = "android:id"; width = "android:layout_width"; height = "android_layout_height"; text = "android:text"; orientation = "android:orientation"
%LinearLayout{ xmlns, width => "fill_parent", height => "fill_parent", orientation => "vertical" }
%TextView{ id => "@+id/text", width => "wrap_content", height => "wrap_content", text => "Hello, I am a TextView" }
%Button{ id => "@+id/button", width => "wrap_content", height => "wrap_content", text => "Hello, I am a Button" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment