Member-only story

Text Input Layout for Sign up and Sign in Android.

Harshita Bambure
2 min readSep 24, 2021

--

Designing is a very important part of every application. The first impression of every application is designing and today we will learn one of the parts of the Text Input Layout. So, let's start.

For Sign up design first of all we need to create one empty activity.

activity_sign_up.xml

<?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=".SignUpActivity">

<com.google.android.material.textview.MaterialTextView
android:id="@+id/txt_hello"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintWidth_percent="0.2"
app:layout_constraintHeight_percent="0.06"
android:gravity="center"
android:text="@string/hello"
android:textColor="#3F51B5"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/txt_signup"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center"
android:text="Sign Up!"
android:textColor="#3F51B5"
android:textSize="32sp"
android:textStyle="bold"
app:layout_constraintHeight_percent="0.1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_hello"
app:layout_constraintWidth_percent="0.4" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/txtLay_username"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintWidth_percent="0.9"
app:layout_constraintHeight_percent="0.1"
android:hint="USERNAME"
app:endIconMode="clear_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintVertical_bias="0.3">…

--

--

Harshita Bambure
Harshita Bambure

Written by Harshita Bambure

Android Developer || WomenTech Global Ambassador at WomenTech Network. || Yoga Teacher || Member @WTM .

No responses yet