<?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:animateLayoutChanges="true"

    tools:context=".ui.LoginActivity">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:scaleType="centerCrop"
        android:src="@drawable/login"
        tools:ignore="MissingConstraints" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1.5">



        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:background="@drawable/toprounded"
            android:orientation="vertical"
            android:padding="0dp">

            <View
                android:layout_width="match_parent"
                android:layout_height="10dp" />

            <TextView
                style="@style/Font"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/welcome_back"
                android:textColor="@color/black"
                android:textSize="18dp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/let_s_login_continues"
                android:textSize="16dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="20dp" />

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="12dp"
                android:gravity="center|start"
                android:padding="5dp"
                android:text="@string/mobile_number"
                android:textColor="@color/black"
                android:textSize="16dp"
                android:textStyle="bold" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="12dp"
                android:gravity="center"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="52dp"
                    android:layout_weight="2.2"

                    android:orientation="vertical">


                    <com.google.android.material.textfield.TextInputLayout
                        android:id="@+id/menu"
                        style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense.ExposedDropdownMenu"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:hint="@string/country_code"
                        app:boxCornerRadiusBottomEnd="10dp"
                        app:boxCornerRadiusBottomStart="10dp"
                        app:boxCornerRadiusTopEnd="10dp"
                        app:boxCornerRadiusTopStart="10dp">

                        <AutoCompleteTextView
                            android:id="@+id/spinnerautocompet"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:inputType="none" />

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

                <View
                    android:layout_width="8dp"
                    android:layout_height="10dp" />

                <com.google.android.material.textfield.TextInputLayout
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"

                    android:hint="@string/mobile_number"
                    app:boxCornerRadiusBottomEnd="10dp"
                    app:boxCornerRadiusBottomStart="10dp"
                    app:boxCornerRadiusTopEnd="10dp"
                    app:boxCornerRadiusTopStart="10dp">

                    <!--this is the actual edit text which takes the input-->
                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/ed_username"
                        android:inputType="phone"

                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

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


            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="8dp" />

            <LinearLayout
                android:id="@+id/lvl_password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="12dp"
                android:gravity="center"
                android:orientation="vertical"
                android:visibility="gone">


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

                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:hint="@string/password"
                    app:boxCornerRadiusBottomEnd="10dp"
                    app:boxCornerRadiusBottomStart="10dp"
                    app:boxCornerRadiusTopEnd="10dp"
                    app:boxCornerRadiusTopStart="10dp"
                    app:boxStrokeColor="@color/gray0"
                    app:hintTextColor="@color/black"
                    app:passwordToggleEnabled="true">

                    <!--this is the actual edit text which takes the input-->
                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/edit_password"
                        android:inputType="textPassword"

                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="5dp">

                <TextView
                    android:id="@+id/txt_forgot"
                    style="@style/Font"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="right"
                    android:padding="5dp"
                    android:text="@string/forgot_password"
                    android:textColor="@color/purple_700" />
            </LinearLayout>

            <View
                android:layout_width="match_parent"
                android:layout_height="8dp" />

            <TextView
                android:id="@+id/btn_login"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:layout_marginEnd="12dp"

                android:gravity="center"
                android:padding="5dp"
                android:text="@string/login"
                style="@style/AppTheme.Button"
                 />

            <View
                android:layout_width="match_parent"
                android:layout_height="20dp" />

            <LinearLayout
                android:id="@+id/lvl_signup"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:orientation="horizontal">

                <TextView

                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:padding="5dp"
                    android:text="@string/don_t_have_an_account" />

                <TextView

                    style="@style/Font"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:padding="5dp"
                    android:text="@string/sign_up"
                    android:textColor="@color/purple_700" />
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>