Layout

Reference

http://developer.android.com/guide/topics/ui/declaring-layout.html

ViewGroups

RelativeLayout
The views are relative to each other.

LinearLayout
The views are next to each other, arranged vertically or horizontally, depending on the android:orientation attribute.

GridLayout
ViewGroup that displays items in two-dimensional scrolling grid.
http://android-developers.blogspot.nl/2011/11/new-layout-widgets-space-and-gridlayout.html
http://developer.android.com/reference/android/widget/GridLayout.html

GridView
ViewGroup that displays items in two-dimensional scrolling grid. The items in the grid come from the ListAdapter associated with this view.

TableLayout
http://developer.android.com/guide/topics/ui/layout/grid.html
http://developer.android.com/reference/android/widget/TableLayout.html

Views

TextView

EditText
android:hint

Button
android:onClick

Common attributes

android:id (start with @+id/)
android:layout_width
android:layout_height
android:layout_weight
android:layout_gravity="center"

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License