Register page using the Constraint Layout
MainActivity.xml
<?xml version="1.0"
encoding="utf-8"?>
<android.support.constraint.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:background="#ffdff4db"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<EditText
android:id="@+id/editText"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_person_black_24dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="USERNAME"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.891"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.272"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/editText2"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_email_black_25dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="E-MAIL"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.814"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.387"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/editText3"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_lock_black_26dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="PASSWORD"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.814"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText4"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_lock_black_26dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="REPEAT_PASSWORD"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.835"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.619"
tools:ignore="MissingConstraints" />
<Button
android:id="@+id/button3"
android:layout_width="246dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/button_round"
android:text="RAGISTER"
android:textColor="#8dde19"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.63"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.751" />
<TextView
android:id="@+id/textView2"
android:layout_width="226dp"
android:layout_height="110dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/text_view2"
android:gravity="center"
android:text="SIGN UP"
android:textColor="#8dde19"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.016" />
</android.support.constraint.ConstraintLayout>
<android.support.constraint.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:background="#ffdff4db"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<EditText
android:id="@+id/editText"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_person_black_24dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="USERNAME"
android:inputType="textPersonName"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.891"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.272"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/editText2"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_email_black_25dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="E-MAIL"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.814"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.387"
tools:ignore="MissingConstraints" />
<EditText
android:id="@+id/editText3"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_lock_black_26dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="PASSWORD"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.814"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText4"
android:layout_width="321dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/edit_round"
android:drawableLeft="@drawable/ic_lock_black_26dp"
android:drawablePadding="10dp"
android:ems="10"
android:hint="REPEAT_PASSWORD"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.835"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.619"
tools:ignore="MissingConstraints" />
<Button
android:id="@+id/button3"
android:layout_width="246dp"
android:layout_height="51dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/button_round"
android:text="RAGISTER"
android:textColor="#8dde19"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.63"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.751" />
<TextView
android:id="@+id/textView2"
android:layout_width="226dp"
android:layout_height="110dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/text_view2"
android:gravity="center"
android:text="SIGN UP"
android:textColor="#8dde19"
android:textSize="30sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.016" />
</android.support.constraint.ConstraintLayout>
Create the login page layout
Login page
Main2Activity.xml
<?xml version="1.0" encoding="utf-8"?> <android.support.constraint.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="#e6f6ff" android:orientation="vertical" tools:context=".Main2Activity"> <EditText android:id="@+id/editText5" android:layout_width="319dp" android:layout_height="59dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:layout_marginBottom="8dp" android:background="@drawable/edit_round" android:drawableLeft="@drawable/ic_email_black_25dp" android:drawablePadding="10dp" android:ems="10" android:hint="E-MAIL" android:inputType="textPersonName" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.829" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.284" /> <EditText android:id="@+id/editText6" android:layout_width="319dp" android:layout_height="56dp" android:layout_marginStart="8dp" android:layout_marginTop="240dp" android:layout_marginEnd="8dp" android:background="@drawable/edit_round" android:drawableLeft="@drawable/ic_lock_black_26dp" android:drawablePadding="10dp" android:ems="10" android:hint="PASSWORD" android:inputType="textPersonName" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.829" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/button" android:layout_width="222dp" android:layout_height="67dp" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:layout_marginBottom="8dp" android:background="@drawable/button_round" android:text="LOGIN" android:textColor="#fff" android:textSize="30dp" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.601" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="0.617" tools:ignore="MissingConstraints" /> </android.support.constraint.ConstraintLayout>
0 comments:
Post a Comment