<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/layout_last_four_digits"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bg_color"
    tools:context=".ui.home.fragment.LastFourDigitFragment">

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

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

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingStart="15dp"
                android:paddingEnd="15dp">

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="6dp"
                    android:text="@string/please_enter_4_last_digits_number"
                    android:textSize="@dimen/default_text_size" />


                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="44dp"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:background="@drawable/bg_last_four_digit_first"
                        android:gravity="center"
                        android:padding="8dp"
                        android:text="018  XXX"
                        android:textSize="18sp" />

                    <View
                        android:layout_width="1dp"
                        android:layout_height="40dp"
                        android:layout_marginTop="10dp"
                        android:background="@color/line_table"
                        android:visibility="gone" />

                    <RelativeLayout
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="1"
                        android:background="@drawable/bg_last_four_digit_two"
                        android:padding="8dp">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:id="@+id/constrain_parent"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:gravity="center"
                            android:orientation="horizontal">

                            <com.seatel.mobilehall.util.customview.CustomEditText
                                android:id="@+id/edit_text_one"
                                style="@style/EditTextDigit"
                                android:layout_width="0dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintDimensionRatio="1"
                                app:layout_constraintHorizontal_chainStyle="packed"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.seatel.mobilehall.util.customview.CustomEditText
                                android:id="@+id/edit_text_two"
                                style="@style/EditTextDigit"
                                android:layout_width="0dp"
                                android:layout_marginStart="5dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintDimensionRatio="1"
                                app:layout_constraintEnd_toStartOf="@+id/edit_text_three"
                                app:layout_constraintHorizontal_chainStyle="packed"
                                app:layout_constraintStart_toEndOf="@+id/edit_text_one"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.seatel.mobilehall.util.customview.CustomEditText
                                android:id="@+id/edit_text_three"
                                style="@style/EditTextDigit"
                                android:layout_width="0dp"
                                android:layout_marginStart="5dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintDimensionRatio="1"
                                app:layout_constraintEnd_toStartOf="@+id/edit_text_four"
                                app:layout_constraintHorizontal_chainStyle="packed"
                                app:layout_constraintStart_toEndOf="@+id/edit_text_two"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.seatel.mobilehall.util.customview.CustomEditText
                                android:id="@+id/edit_text_four"
                                style="@style/EditTextDigit"
                                android:layout_width="0dp"
                                android:layout_marginStart="5dp"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintDimensionRatio="1"
                                app:layout_constraintHorizontal_chainStyle="packed"
                                app:layout_constraintStart_toEndOf="@+id/edit_text_three"
                                app:layout_constraintTop_toTopOf="parent" />
                        </androidx.constraintlayout.widget.ConstraintLayout>

                    </RelativeLayout>

                    <com.seatel.mobilehall.util.customview.CustomButton
                        android:id="@+id/button_search"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_gravity="center_vertical"
                        android:background="@drawable/bg_button_primary"
                        android:gravity="center"
                        android:paddingStart="4dp"
                        android:paddingEnd="4dp"
                        android:text="@string/search"
                        android:textAllCaps="false"
                        android:textColor="@android:color/white"
                        android:textSize="16sp" />

                    <TextView
                        android:id="@+id/text_view_hidden"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:maxLength="4"
                        android:visibility="gone" />


                </LinearLayout>

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:id="@+id/note"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:layout_marginBottom="6dp"
                    android:text="@string/note_buy_sim"
                    android:textColor="@color/section_grey"
                    android:textSize="@dimen/default_text_size" />

                <include
                    android:id="@+id/itemBuyYesNumber"
                    layout="@layout/item_buy_yes_number" />

            </LinearLayout>


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

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_view_last_digit"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:paddingTop="10dp"
                    android:theme="@android:style/Theme.Material.Light" />

                <include layout="@layout/layout_default_error" />
            </FrameLayout>

        </LinearLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@color/bg_color"
            android:clickable="true"
            android:focusable="true"
            android:orientation="vertical">

            <include
                android:id="@+id/layoutNext"
                layout="@layout/layout_next" />

            <com.seatel.mobilehall.util.customview.CustomKeyboard
                android:id="@+id/keyboard_view_last"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:paddingStart="15dp"
                android:paddingEnd="15dp"
                android:visibility="gone"
                app:keyBackground="@drawable/bg_button_white" />
        </LinearLayout>


    </RelativeLayout>

    <!--<include layout="@layout/layout_bottom_sheet_buy_yes_number_next" />-->
</androidx.coordinatorlayout.widget.CoordinatorLayout>
