Linear Layouts are for horizontal or vertical stacking of elements,linearly.

One proper Relative Layout can replace several nested linear layouts. Position of a child view in a Relative layout is relative to its sibling view, or, relative to the Relative layout area.

If your layout has a requirement of rows or columns then use Table Layout, this has “TableRow”(s) as primary nodes in the tree, inside these nodes other Views are nested.

TextView,–> Where-ever there is text, it will be inside a textview(A textview has no boundries).

The Android.jar file,

This file holds the nitty gritty of the android OS, what ever you see on the phone is contained here, either as direct resources or the PNG or as XML.

The android:layout_weight ,

This values of this attribute behave in direct proportionality to the view port when applied to basic elements such as TextViews etc. whereas values behave in inverse proportionality when applied to nested linear layouts(i.e. when a parent linear layout has multiple nested linear layouts).

The android: gravity,

Decides how to align an element contained in a container(e.g.–text in a TextView), takes 3 values–“left”, “right”, “center_horizontal”.


Positions the top edge of this view below the given anchor view.


Only found for table layout, takes the zero based index of the column to stretch.