Featured post

Displaying Multiple Fragments in a single Activity

Thursday, 29 October 2015

Displaying the Name and Age of the user

Demo 3:

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:padding="10dp">
    <TextView
        android:text="Name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="20sp"/>
    <EditText
        android:id="@+id/editText1"
        android:hint="Enter your name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"/>
   
     <TextView
        android:text="Age"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textSize="20sp"
        android:paddingTop="20dp"/>
   
      <EditText
        android:id="@+id/editText2"
        android:hint="Enter your age"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
       />
      <LinearLayout
          android:id="@+id/linear1"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="vertical"
          android:padding="20dp">
      <Button
          android:id="@+id/button1"

          android:text="Submit"
          android:layout_width="150dp"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
       
          />
        <TextView
          android:id="@+id/display"
          android:text="Your Details are:"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:textSize="20sp"
          android:padding="20dp"
         
          />
      </LinearLayout>
     
</LinearLayout>




1 comment: