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

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <RelativeLayout
            android:id="@+id/LoginLayout"
            style="@style/Widget.Rounded.BottomSheet"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="20dp">

            <ImageButton
                android:id="@+id/closeBtnLogin"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_alignParentStart="true"
                android:layout_alignParentTop="true"
                android:adjustViewBounds="true"
                android:backgroundTint="@android:color/transparent"
                android:padding="20dp"
                android:scaleType="centerInside"
                android:src="@drawable/ic_close" />

            <ScrollView
                android:layout_below="@id/closeBtnLogin"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">


                    <ImageView
                        android:id="@+id/messerLogoInLogin"
                        android:layout_width="wrap_content"
                        android:layout_height="213dp"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="20dp"
                        android:layout_marginBottom="40dp"
                        android:src="@drawable/login_image" />

                    <com.google.android.material.textview.MaterialTextView
                        android:id="@+id/tvLogin"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/messerLogoInLogin"
                        android:paddingLeft="12dp"
                        android:text="Login Your Account"
                        android:textColor="@color/colorPrimary"
                        android:textFontWeight="600"
                        android:textSize="16sp" />

                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/formUsernameLogin"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/tvLogin"
                        android:hint="@string/username">

                        <com.google.android.material.textfield.TextInputEditText
                            android:id="@+id/ETUsernameLogin"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:imeOptions="actionNext"
                            android:textColor="@color/colorPrimary"
                            android:inputType="text" />

                    </com.google.android.material.textfield.TextInputLayout>

                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/FormPasswordLogin"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/formUsernameLogin"
                        android:layout_marginTop="20dp"
                        app:passwordToggleEnabled="true"
                        android:hint="@string/password">

                        <com.google.android.material.textfield.TextInputEditText
                            android:id="@+id/ETPasswordLogin"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:imeOptions="actionDone|actionGo"
                            android:textColor="@color/colorPrimary"
                            android:inputType="text|textPassword" />

                    </com.google.android.material.textfield.TextInputLayout>


                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/constraintBtn"
                        android:layout_below="@id/FormPasswordLogin"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="20dp">

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/SignInButtonInLogin"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="Sign in"
                        android:padding="20dp"
                        app:layout_constraintTop_toTopOf="parent"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"/>

                    <ProgressBar
                        android:id="@+id/progressLogin"
                        style="?android:attr/progressBarStyle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:elevation="2dp"
                        app:layout_constraintBottom_toBottomOf="@id/SignInButtonInLogin"
                        app:layout_constraintTop_toTopOf="@id/SignInButtonInLogin"
                        app:layout_constraintStart_toStartOf="@id/SignInButtonInLogin"
                        app:layout_constraintEnd_toEndOf="@id/SignInButtonInLogin"
                        />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/forgotPwd"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Forgot Password?"
                    android:layout_below="@id/constraintBtn"
                    android:layout_marginTop="10dp"
                    android:layout_alignParentEnd="true"
                    android:textColor="@color/colorPrimary"/>

                </RelativeLayout>
            </ScrollView>
    </RelativeLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

</layout>
