Facebook Lite App Login Screen Design Android Studio

facebook-lite-app-login-screen-design-android-studio

facebook-lite-app-login-screen-design-android-studio

login screen is a web page or an entry page to a web/mobile application that requires user identification and authentication, regularly performed by entering a username and password combination. The login process is the most essential feature for any system/application as it provides access to an entire web-site/application or part of it. So, testing of the login screen needs complete coverage.

themes.xml

<resources xmlns:tools="http://schemas.android.com/tools">
    <!-- Base application theme. -->
    <style name="Theme.LOGINFB" parent="Theme.MaterialComponents.DayNight.NoActionBar">
        <!-- Primary brand color. -->
        <item name="colorPrimary">@color/purple_500</item>
        <item name="colorPrimaryVariant">@color/purple_700</item>
        <item name="colorOnPrimary">@color/white</item>
        <!-- Secondary brand color. -->
        <item name="colorSecondary">@color/teal_200</item>
        <item name="colorSecondaryVariant">@color/teal_700</item>
        <item name="colorOnSecondary">@color/black</item>
        <!-- Status bar color. -->
        <item name="android:statusBarColor">#FFFFFF</item>
        <!-- Customize your theme here. -->
    </style>
</resources>

border.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

    <stroke android:width="1dp"
        android:color="#0041FF"/>
</shape>

activity_main.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"
    android:background="#FFF"
    tools:context=".MainActivity">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/title_layout"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        >

        <TextView
            android:id="@+id/fb_txt"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Facebook"
            android:textColor="#857C7C"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <View
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:background="#B8B3B3"
            android:layout_marginTop="7dp"
            app:layout_constraintTop_toBottomOf="@+id/fb_txt"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <TextView
        android:id="@+id/username_txt"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="Mobile number or email"
        app:layout_constraintTop_toBottomOf="@+id/title_layout"
        android:textColor="#000"
        android:textSize="16sp"
        android:fontFamily="sans-serif-condensed"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/box1_layout"
        android:layout_width="0dp"
        android:layout_height="35dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:background="@drawable/border"
        app:layout_constraintTop_toBottomOf="@id/username_txt"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"

        >

        <EditText
            android:id="@+id/username"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:hint=""
            android:ellipsize="end"
            android:maxLines="1"
            android:paddingStart="5dp"
            android:paddingEnd="5dp"
            android:inputType="text"
            android:layout_margin="1dp"
            android:background="@color/white"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <TextView
        android:id="@+id/password_txt"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="Password"
        app:layout_constraintTop_toBottomOf="@+id/box1_layout"
        android:textColor="#000"
        android:textSize="16sp"
        android:fontFamily="sans-serif-condensed"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/box2_layout"
        android:layout_width="0dp"
        android:layout_height="35dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:background="@drawable/border"
        app:layout_constraintTop_toBottomOf="@id/password_txt"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"

        >

        <EditText
            android:id="@+id/password"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:hint=""
            android:ellipsize="end"
            android:maxLines="1"
            android:inputType="textPassword"
            android:paddingStart="5dp"
            android:paddingEnd="5dp"
            android:layout_margin="1dp"
            android:background="@color/white"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/password_hide_view"
            />

        <ImageView
            android:id="@+id/password_hide_view"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:src="@drawable/ic_baseline_remove_red_eye_24"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:layout_marginEnd="5dp"
            />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/login_button"
        android:layout_width="0dp"
        android:layout_height="30dp"
        android:background="#4255F4"
        android:layout_marginTop="8dp"
        app:layout_constraintTop_toBottomOf="@+id/box2_layout"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Log in"
            android:textColor="#FFFFFF"
            android:textStyle="bold"
            android:textSize="14sp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <TextView
        android:id="@+id/btn_forgotten"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="#000EFF"
        android:textStyle="bold"
        android:text="Forgot Password?"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/login_button"
        />

    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="#B8B3B3"
        app:layout_constraintEnd_toStartOf="@+id/or_txt"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/or_txt"
        app:layout_constraintBottom_toBottomOf="@id/or_txt"
        android:layout_marginStart="16dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        />

    <TextView
        android:id="@+id/or_txt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="or"
        android:textSize="14sp"
        android:textColor="#000"
        android:textStyle="bold"
        app:layout_constraintTop_toBottomOf="@id/btn_forgotten"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginTop="8dp"
        />

    <View
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:background="#B8B3B3"
        app:layout_constraintStart_toEndOf="@+id/or_txt"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/or_txt"
        app:layout_constraintBottom_toBottomOf="@id/or_txt"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="16dp"
        android:layout_marginTop="8dp"
        />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/register_button"
        android:layout_width="wrap_content"
        android:layout_height="30dp"
        android:background="#00C119"
        android:layout_marginTop="8dp"
        app:layout_constraintTop_toBottomOf="@+id/or_txt"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Create new account"
            android:textColor="#FFFFFF"
            android:textStyle="bold"
            android:textSize="14sp"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <TextView
        android:id="@+id/lang_en"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="#000EFF"
        android:text="English (US)"
        android:fontFamily="sans-serif-condensed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/register_button"
        />

    <TextView
        android:id="@+id/lang_bn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="#000EFF"
        android:text="বাংলা"
        android:fontFamily="sans-serif-condensed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/lang_en"
        />

    <TextView
        android:id="@+id/lang_osmia"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="#000EFF"
        android:text="ওসমীয়া"
        android:fontFamily="sans-serif-condensed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/lang_bn"
        />

    <TextView
        android:id="@+id/lang_more"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:textColor="#000EFF"
        android:text="More Language..."
        android:fontFamily="sans-serif-condensed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/lang_osmia"
        />


</androidx.constraintlayout.widget.ConstraintLayout>

Leave a Reply

Your email address will not be published. Required fields are marked *