• The android:layout_gravity attribute specifies how a view is aligned within its parent View.
    • center_horizontal
    • center_vertical -
  • The android:gravity attribute specifies the alignment of the content of a View within the View itself.

  • The android:layout_weight attribute indicates how much of the extra space in the LinearLayout will be allocated to the views that have this parameter set. If only one view has this attribute, it gets all the extra screen estate. For multiple views, the space is pro-rated. For example, if the buttons have a weight of 1 and the text view 2, totalling 4, the buttons get ¼ of the space each, and the textview half.

results matching ""

    No results matching ""