<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
    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/RegisterLayout"
            style="@style/Widget.Rounded.BottomSheet"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="20dp">

            <ImageButton
                android:id="@+id/ivclose"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:adjustViewBounds="true"
                android:backgroundTint="@android:color/transparent"
                android:padding="10dp"
                android:src="@drawable/ic_close"
                app:layout_constraintStart_toStartOf="parent" />


            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@id/ivclose"
                android:scrollbars="none">

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

                    <ImageView
                        android:id="@+id/ivMeserRegister"
                        android:layout_width="match_parent"
                        android:layout_height="213dp"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="20dp"
                        android:layout_marginBottom="40dp"
                        android:src="@drawable/register_image" />

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

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

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

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


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/formEmailReg"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/formUsernameReg"
                        android:layout_marginTop="5dp"
                        android:hint="@string/email">

                        <com.google.android.material.textfield.TextInputEditText
                            android:id="@+id/ETEmailReg"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:imeOptions="actionNext"
                            android:inputType="textEmailAddress" />

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

                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/FormPasswordReg"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/formEmailReg"
                        android:layout_marginTop="5dp"
                        android:hint="@string/password">

                        <com.google.android.material.textfield.TextInputEditText
                            android:id="@+id/ETPasswordReg"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:imeOptions="actionNext"
                            android:inputType="textPassword" />

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


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/FormRePasswordReg"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/FormPasswordReg"
                        android:layout_marginTop="5dp"
                        android:hint="@string/password_Confirmation">

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

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

                    <CheckBox
                        android:id="@+id/cbAgree"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/FormRePasswordReg"
                        android:layout_marginVertical="10dp"
                        android:text="I Agree of terms of use"
                        android:textColor="@color/colorPrimary"
                        app:useMaterialThemeColors="true" />


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

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/MBRegister"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingTop="20dp"
                        android:text="Create Account"
                        tools:ignore="MissingConstraints" />

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

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </RelativeLayout>

            </ScrollView>

        </RelativeLayout>

    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>