Layout XML Code (Cont.)

android:layout_weight = "0.07"
The android:layout_weight assigns an “importance” value to a view in terms of how much space it should occupy on the screen. A larger weight value allows it to expand to fill any remaining space in the parent view.

android:weightSum="1"
Defines the maximum weight sum. If unspecified, the sum is computed by adding the layout_weight of all of the children.

android:gravity="center"
This attribute specifies how to place the content of an object, both on the x- and y-axis, within the object itself. The value center places the object in the center of its container in both the vertical and horizontal axis, not changing its size.

android:textAppearance = "?android:attr/textAppearanceLarge"
This corresponds to the global attribute resource symbol textAppearance, which specifies base text color, typeface, size, and style. Must be a reference to another resource, in the form
   @[+][package:]type:name
such as @android:color/black or to a theme attribute in the form
   ?[package:][type:]name
such as ?android:attr/textColorPrimary.
HelloWorld/app/src/main/res/layout/activity_main.xml
<LinearLayout
  xmlns:android            = "http://schemas.android.com/apk/res/android"
  android:orientation      = "vertical"
  android:layout_width     = "fill_parent"
  android:layout_height    = "fill_parent"
  android:weightSum        = "1"
  android:gravity          = "center">
  <TextView
    android:layout_width   = "wrap_content"
    android:layout_height  = "wrap_content"
    android:textAppearance = "?android:attr/textAppearanceLarge"
    android:text           = "Hello, your name:"
    android:layout_weight  = "0.07"
    android:textStyle      = "bold" />
  <EditText
    android:layout_width   = "216dp"
    android:layout_height  = "wrap_content"
    android:id             = "@+id/name" />
  <Button
    android:layout_width   = "wrap_content"
    android:layout_height  = "wrap_content"
    android:text           = "@string/next_page"
    android:id             = "@+id/next" />
</LinearLayout>




      I’m not in this world to live up to your expectations and    
      you’re not in this world to live up to mine.    
      ― Bruce Lee