<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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="wrap_content"
    tools:context=".ui.home.fragment.HomeFragment">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/frame_toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorPrimaryDark"
        android:padding="5dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageView
            android:id="@+id/circleProfile"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:src="@drawable/ic_yes_profile"
            android:tag="PROFILE"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.seatel.mobilehall.util.customview.CustomTextView
            android:id="@+id/view_login_sign_up"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/margin_1x_size"
            android:text="Login or Sign Up"
            android:textColor="@color/white"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@+id/circleProfile"
            app:layout_constraintStart_toEndOf="@+id/circleProfile"
            app:layout_constraintTop_toTopOf="@+id/circleProfile" />

        <com.seatel.mobilehall.util.customview.CustomTextView
            android:id="@+id/profile_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:layout_marginTop="5dp"
            android:textColor="@color/white"
            android:textStyle="bold"
            android:visibility="gone"
            app:layout_constraintStart_toEndOf="@+id/circleProfile"
            app:layout_constraintTop_toTopOf="@+id/circleProfile" />

        <com.seatel.mobilehall.util.customview.CustomTextView
            android:id="@+id/profile_number"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:layout_marginBottom="5dp"
            android:textColor="@color/white"
            android:textStyle="bold"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="@+id/circleProfile"
            app:layout_constraintStart_toEndOf="@+id/circleProfile"
            app:layout_constraintTop_toBottomOf="@+id/profile_name" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:baselineAligned="false"
            android:paddingStart="5dp"
            android:paddingEnd="5dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <RelativeLayout
                android:id="@+id/layout_invite_friend"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="-2dp"
                android:layout_weight="1"
                android:tag="INVITED_FRI"
                android:visibility="gone">

                <ImageView
                    android:layout_width="33dp"
                    android:layout_height="33dp"
                    android:contentDescription="@string/app_name"
                    android:paddingTop="2dp"
                    android:paddingBottom="2dp"
                    android:scaleType="fitCenter"
                    android:src="@drawable/invite_friend"
                    app:tint="@color/white" />

                <TextView
                    android:layout_width="20dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="15dp"
                    android:background="@drawable/rounded_corner"
                    android:gravity="center"
                    android:maxWidth="29dp"
                    android:textAlignment="center"
                    android:textColor="@android:color/white"
                    android:textSize="9dp"
                    android:visibility="invisible" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/layout_cart"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="-2dp"
                android:layout_weight="1"
                android:tag="MY_CART"
                android:visibility="visible">

                <ImageView
                    android:layout_width="33dp"
                    android:layout_height="33dp"
                    android:contentDescription="@string/app_name"
                    android:paddingTop="2dp"
                    android:paddingBottom="2dp"
                    android:scaleType="fitCenter"
                    android:src="@drawable/ic_eshop_menu"
                    app:tint="@color/white" />

                <TextView
                    android:id="@+id/count_badge_cart"
                    android:layout_width="20dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="15dp"
                    android:background="@drawable/rounded_corner"
                    android:gravity="center"
                    android:maxWidth="29dp"
                    android:textAlignment="center"
                    android:textColor="@android:color/white"
                    android:textSize="9dp"
                    android:visibility="gone" />

            </RelativeLayout>


            <RelativeLayout
                android:id="@+id/layout_noti"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:tag="NOTIFICATION"
                android:visibility="visible">

                <ImageView
                    android:layout_width="33dp"
                    android:layout_height="33dp"
                    android:layout_centerInParent="true"
                    android:contentDescription="@string/app_name"
                    android:paddingTop="2dp"
                    android:paddingBottom="2dp"
                    android:scaleType="fitCenter"
                    android:src="@drawable/ic_notification"
                    app:tint="@color/white" />

                <TextView
                    android:id="@+id/count_badge_notification"
                    android:layout_width="20dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="16dp"
                    android:background="@drawable/rounded_corner"
                    android:gravity="center"
                    android:maxWidth="29dp"
                    android:textAlignment="center"
                    android:textColor="@android:color/white"
                    android:textSize="9dp"
                    android:visibility="invisible" />

            </RelativeLayout>

        </LinearLayout>


    </androidx.constraintlayout.widget.ConstraintLayout>


    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        android:id="@+id/mSwipeRefreshLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/frame_toolbar">

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fillViewport="true">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:nestedScrollingEnabled="false"
                android:visibility="visible">

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

                    <View
                        android:id="@+id/view3"
                        android:layout_width="match_parent"
                        android:layout_height="105dp"
                        android:background="@drawable/header_background"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <androidx.appcompat.widget.AppCompatImageView
                        android:layout_width="match_parent"
                        android:id="@+id/viewpager_banner"
                        android:background="@color/browser_actions_bg_grey"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/margin_1x_size"
                        android:layout_marginEnd="@dimen/margin_1x_size"
                        app:layout_constraintBottom_toBottomOf="@id/viewpager2"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="@id/viewpager2"
                        />
                    <androidx.viewpager2.widget.ViewPager2
                        android:layout_width="match_parent"
                        android:layout_height="112dp"
                        android:layout_marginStart="@dimen/margin_1x_size"
                        android:layout_marginEnd="@dimen/margin_1x_size"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        android:id="@+id/viewpager2"/>


                </androidx.constraintlayout.widget.ConstraintLayout>


                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/frameStatusBalance"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:tag="SUBSCRIPTION"
                    app:layout_constraintBottom_toTopOf="@+id/homeRecyclerView"
                    app:layout_constraintTop_toBottomOf="@+id/frame_banner">

                    <androidx.cardview.widget.CardView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        app:cardCornerRadius="@dimen/margin_1x_size"
                        app:cardPreventCornerOverlap="true"
                        app:cardUseCompatPadding="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintTop_toTopOf="parent">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:padding="@dimen/margin_2x_size">


                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_unbilled"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="Unbilled amount"
                                android:textAlignment="textStart"
                                android:textColor="@color/colorRed"
                                android:textSize="@dimen/extra_small_text_size"
                                android:visibility="invisible"
                                app:layout_constraintBottom_toTopOf="@+id/sign_dolla"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />


                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/sign_dolla"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_centerVertical="true"
                                android:text="$"
                                android:textColor="@color/colorBlue"
                                android:textSize="30sp"
                                android:textStyle="bold"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_main_balance"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_centerVertical="true"
                                android:layout_marginStart="3dp"
                                android:layout_toEndOf="@+id/sign_dolla"
                                android:text="100"
                                android:textColor="@color/colorBlue"
                                android:textSize="30sp"
                                android:textStyle="bold"
                                app:layout_constraintBottom_toBottomOf="@+id/sign_dolla"
                                app:layout_constraintStart_toEndOf="@+id/sign_dolla"
                                app:layout_constraintTop_toTopOf="@+id/sign_dolla" />


                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_expires"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@string/expires"
                                android:textColor="@color/colorGray"
                                android:textSize="@dimen/extra_small_text_size"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/sign_dolla" />

                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_expires_val"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_toEndOf="@+id/txt_expires"
                                android:textColor="@color/colorGray"
                                android:textSize="@dimen/extra_small_text_size"
                                app:layout_constraintBottom_toBottomOf="@+id/txt_expires"
                                app:layout_constraintStart_toEndOf="@+id/txt_expires"
                                app:layout_constraintTop_toTopOf="@+id/txt_expires" />


                            <ImageView
                                android:id="@+id/checkbox"
                                android:layout_width="20dp"
                                android:layout_height="15dp"
                                android:layout_marginStart="@dimen/margin_2x_size"
                                android:layout_marginTop="3dp"
                                android:src="@drawable/ic_check_balance"
                                android:visibility="visible"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintStart_toEndOf="@+id/txt_main_balance"
                                app:layout_constraintTop_toTopOf="parent" />

                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_plan_package"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_toEndOf="@+id/checkbox"
                                android:maxLines="2"
                                android:text="Mobile Staff Premier 25"
                                android:textAlignment="textStart"
                                android:textColor="@color/colorBlue"
                                android:textSize="@dimen/default_text_size"
                                android:visibility="visible"
                                app:layout_constraintBottom_toBottomOf="@+id/checkbox"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toEndOf="@+id/checkbox"
                                app:layout_constraintTop_toTopOf="@+id/checkbox" />

                            <com.seatel.mobilehall.util.customview.CustomTextView
                                android:id="@+id/txt_status"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_below="@+id/txt_plan_package"
                                android:layout_centerHorizontal="true"
                                android:text="Active"
                                android:textSize="@dimen/small_text_size"
                                android:textStyle="bold"
                                android:visibility="visible"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toBottomOf="@+id/txt_plan_package" />


                            <Button
                                android:id="@+id/btn_balance"
                                android:layout_width="wrap_content"
                                android:layout_height="25dp"
                                android:layout_alignParentEnd="true"
                                android:layout_marginEnd="5dp"
                                android:background="@drawable/bg_button_primary"
                                android:tag="BUTTON_BALANCE"
                                android:text="Click Here"
                                android:textColor="@color/white"
                                android:textSize="@dimen/extra_small_text_size"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                        </androidx.constraintlayout.widget.ConstraintLayout>


                    </androidx.cardview.widget.CardView>

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/homeRecyclerView"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="@dimen/margin_2x_size"
                    android:nestedScrollingEnabled="false"
                    android:orientation="horizontal"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/frameStatusBalance"
                    tools:itemCount="5"
                    tools:listitem="@layout/item_category" />


                <View
                    android:id="@+id/view2"
                    android:layout_width="5dp"
                    android:layout_height="20dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginTop="5dp"
                    android:background="@color/colorPrimaryDark"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/homeRecyclerView" />

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="5dp"
                    android:text="@string/buy_top_up_card"
                    android:textAllCaps="true"
                    android:textColor="@color/black"
                    android:textSize="15sp"
                    android:textStyle="bold"
                    app:layout_constraintBottom_toBottomOf="@+id/view2"
                    app:layout_constraintStart_toEndOf="@+id/view2" />

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/frame_topup"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/view2">


                    <androidx.cardview.widget.CardView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:elevation="10dp"
                        app:cardCornerRadius="10dp"
                        app:cardPreventCornerOverlap="true"
                        app:cardUseCompatPadding="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <Button
                                android:id="@+id/btn_top_up"
                                android:layout_width="wrap_content"
                                android:layout_height="30dp"
                                android:layout_alignParentEnd="true"
                                android:layout_marginTop="10dp"
                                android:layout_marginEnd="5dp"
                                android:background="@drawable/bg_box_white_stroke_primary"
                                android:padding="5dp"
                                android:tag="BUTTON_TOP_UP"
                                android:text="Click Here"
                                android:textColor="@color/colorPrimary"
                                android:textSize="10sp"
                                android:visibility="invisible"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <ImageView
                                android:id="@+id/imageBuyTopup"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:scaleType="centerCrop"
                                android:tag="BUYTOPUPCARD"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />
                        </androidx.constraintlayout.widget.ConstraintLayout>


                    </androidx.cardview.widget.CardView>


                </androidx.constraintlayout.widget.ConstraintLayout>


                <FrameLayout
                    android:id="@+id/frame_video_view"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/margin_1x_size"
                    app:layout_constraintTop_toBottomOf="@+id/frame_topup">


                    <com.google.android.exoplayer2.ui.PlayerView
                        android:id="@+id/player_View"
                        android:layout_width="match_parent"
                        android:layout_height="200dp">

                        <ImageView
                            android:id="@+id/image_Video_Thumbnail"
                            android:layout_width="match_parent"
                            android:layout_height="200dp"
                            android:scaleType="centerCrop" />
                    </com.google.android.exoplayer2.ui.PlayerView>

                    <ImageView
                        android:id="@+id/image_Play_Video"
                        android:layout_width="50dp"
                        android:layout_height="50dp"
                        android:layout_gravity="center"
                        android:src="@drawable/ic_play_video"
                        app:tint="@color/white" />
                </FrameLayout>


                <View
                    android:id="@+id/view4"
                    android:layout_width="5dp"
                    android:layout_height="20dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginTop="5dp"
                    android:background="@color/colorPrimaryDark"
                    android:visibility="visible"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/frame_video_view" />

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="5dp"
                    android:text="Buy yes number"
                    android:textAllCaps="true"
                    android:textColor="@color/black"
                    android:textStyle="bold"
                    android:visibility="visible"
                    app:layout_constraintBottom_toBottomOf="@+id/view4"
                    app:layout_constraintStart_toEndOf="@+id/view4" />

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/frame_buyNumber"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginBottom="@dimen/margin_1x_size"
                    android:adjustViewBounds="true"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/view4">


                    <androidx.cardview.widget.CardView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:adjustViewBounds="true"
                        android:elevation="10dp"
                        app:cardCornerRadius="10dp"
                        app:cardPreventCornerOverlap="true"
                        app:cardUseCompatPadding="true"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent">

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:layout_width="match_parent"
                            android:layout_height="match_parent">

                            <Button
                                android:id="@+id/btn_number"
                                android:layout_width="wrap_content"
                                android:layout_height="30dp"
                                android:layout_alignParentEnd="true"
                                android:layout_marginTop="10dp"
                                android:layout_marginEnd="5dp"
                                android:background="@drawable/bg_box_white_stroke_primary"
                                android:padding="5dp"
                                android:tag="BUTTON_NUMBER"
                                android:text="Click Here"
                                android:textColor="@color/colorPrimary"
                                android:textSize="10sp"
                                android:visibility="invisible"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <ImageView
                                android:id="@+id/image_buy_number"
                                android:layout_width="match_parent"
                                android:layout_height="match_parent"
                                android:background="@color/colorPrimary"
                                android:scaleType="centerCrop"
                                android:tag="BUYYESNUMBER"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />
                        </androidx.constraintlayout.widget.ConstraintLayout>
                    </androidx.cardview.widget.CardView>
                </androidx.constraintlayout.widget.ConstraintLayout>


            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.core.widget.NestedScrollView>

    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>


    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true">

        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/floating_support_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:contentDescription="@string/support"
            android:tag="BUTTON_SUPPORT"
            android:tint="@color/white"
            app:fabSize="mini"
            app:srcCompat="@drawable/ic_billing_voice_parent" />
    </androidx.coordinatorlayout.widget.CoordinatorLayout>


</RelativeLayout>