Practical No. 5A

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Practical no.

-05
Title: Develop a program to implement linear and absolute layout
Roll No.:15 Batch- A Date of Performance: 08/01/2024
1)
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="409dp"
android:layout_height="729dp"
android:orientation="vertical"
tools:layout_editor_absoluteX="1dp"
tools:layout_editor_absoluteY="1dp"
tools:ignore="MissingConstraints">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="132dp"
app:srcCompat="@drawable/user" />
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:textAlignment="center">
<EditText
android:id="@+id/editTextText6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text"
android:text="Enter your Name-"
android:textAlignment="textStart"
android:textSize="20sp"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextNumber"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number"
android:text="Enter Age-"
android:textAlignment="textStart"
android:textSize="20sp"
android:textStyle="bold" />
<EditText
android:id="@+id/editTextNumber2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number"
android:text="Enter Mobile Number-"
android:textAlignment="textStart"
android:textSize="20sp"
android:textStyle="bold" />
<AbsoluteLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_x="60dp"
android:layout_y="100dp"
android:text="Submit"
android:textAlignment="center"
android:textSize="24sp"
android:textStyle="bold" />
<Button
android:id="@+id/button6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_x="200dp"
android:layout_y="100dp"
android:text="Cancel"
android:textAlignment="center"
android:textSize="24sp"
android:textStyle="bold" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="550dp"
android:layout_height="300dp"
android:layout_x="-62dp"
android:layout_y="177dp"
app:srcCompat="@drawable/social" />
</AbsoluteLayout>
</LinearLayout>
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

You might also like