Layout XML Code (Cont.)

EditText class
It is a subclass of TextView that configures itself to be editable. It is often used for providing an input or text field, especially in forms.

Button class
It is a push-button widget and is a subclass of the class TextView.

android:text="@string/next_page"
This attribute value references a string resource, “Next Page,” by using the XML syntax:
   @[<package_name>:]<resource_type>/<resource_name>
but if the resources are from your own package such as
@string/next_page in the file res/values/strings.xml
you do not need to specify the package name. To reference a system resource, you would need to include the package name. The android package contains resource classes used by applications included in the platform and defines application permissions for system features.

android:id="@+id/next"
+id/label” means that your resource will have an id value label, next in this case, and that resource label belongs to your application’s name space. Therefore, the Java program can then reference the resource next such as
   output = (TextView) findViewById( R.id.next );
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 have a very secure job.    
      There’s nobody else who would want it.