0% found this document useful (0 votes)
2 views2 pages

Untitled 2

The document is an XML layout file for an Android application using ConstraintLayout. It includes a background view, an ImageView for an icon, a TextView for instructions, a TextInputLayout for mobile number input, and a Button to get an OTP. The layout is designed to be responsive and visually appealing with specified constraints and styles.

Uploaded by

kgaurav891
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Untitled 2

The document is an XML layout file for an Android application using ConstraintLayout. It includes a background view, an ImageView for an icon, a TextView for instructions, a TextInputLayout for mobile number input, and a Button to get an OTP. The layout is designed to be responsive and visually appealing with specified constraints and styles.

Uploaded by

kgaurav891
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

<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"
android:background="@color/colorPrimary"
tools:context=".MainActivity">
<View
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="380dp"
android:background="@drawable/login_background"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/app_name"
android:src="@drawable/small_icon"

app:layout_constraintBottom_toBottomOf="@+id/view"
app:layout_constraintEnd_toEndOf="@+id/view"
app:layout_constraintStart_toStartOf="@+id/view"
app:layout_constraintTop_toTopOf="@+id/view" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="50dp"
android:gravity="center"
android:text="Enter Mobile Number to continue"
android:textSize="25sp"
android:textColor="@color/colorPrimary"
android:fontFamily="sans-serif"

app:layout_constraintBottom_toBottomOf="@+id/view"

app:layout_constraintTop_toBottomOf="@id/imageView" />

<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
style="@style/Widget.MaterialComponents.TextInputLayout.O
utlinedBox"
android:id="@+id/et1"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="32dp"
android:hint="Mobile Number"
app:layout_constraintTop_toBottomOf="@id/view">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:inputType="number"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/bt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get OTP"
android:layout_marginTop="10dp"
android:layout_gravity="center"
android:textColor="@color/colorPrimary"

app:layout_constraintTop_toBottomOf="@id/et1"/>

</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

You might also like