<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    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="wrap_content">

        <ImageView
            android:id="@+id/iv_banner"
            android:layout_width="match_parent"
            android:layout_height="300dp"
            android:adjustViewBounds="true"
            android:scaleType="centerCrop"
            android:src="@drawable/ic_invite_friend_banner"
            app:layout_constraintTop_toTopOf="parent" />

        <LinearLayout
            android:id="@+id/total_friend"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/colorBgWhiteGray"
            android:orientation="horizontal"
            android:padding="@dimen/margin_2x_size"
            app:layout_constraintTop_toBottomOf="@+id/iv_banner">


            <View
                android:layout_width="5dp"
                android:layout_height="30dp"
                android:layout_gravity="center_vertical"
                android:background="@color/colorPrimary" />

            <com.seatel.mobilehall.util.customview.CustomTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginStart="@dimen/margin_1x_size"
                android:text="Total Friend Invitation"
                android:textSize="@dimen/large_text_size"
                android:textStyle="bold" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="end"
                android:orientation="horizontal">

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:id="@+id/total_friend_invitation"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginEnd="@dimen/margin_2x_size"
                    android:textColor="@color/colorPrimary"
                    android:textSize="@dimen/xxl_large_text_size"
                    android:textStyle="bold" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:src="@drawable/add_number_icon"
                    app:tint="@color/colorPrimary" />
            </LinearLayout>


        </LinearLayout>


        <RelativeLayout
            android:id="@+id/rl_qr_code"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/margin_2x_size"
            app:layout_constraintBottom_toTopOf="@+id/linearLayout"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/total_friend">

            <ImageView
                android:id="@+id/iv_qr"
                android:layout_width="200dp"
                android:layout_height="200dp"
                android:layout_centerInParent="true" />

            <com.seatel.mobilehall.util.customview.CustomTextView
                android:id="@+id/tv_message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="@dimen/margin_3x_size"
                android:textColor="@color/colorPrimary"
                android:textSize="@dimen/large_text_size"
                android:visibility="visible" />

            <com.seatel.mobilehall.util.customview.ErrorHandleView
                android:id="@+id/error_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true" />
        </RelativeLayout>


        <LinearLayout
            android:id="@+id/linearLayout"
            android:layout_width="350dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/margin_2x_size"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent">


            <com.seatel.mobilehall.util.customview.CustomButton
                android:id="@+id/btn_scan_qr"
                android:layout_width="0dp"
                android:layout_height="@dimen/button_height"
                android:layout_marginStart="@dimen/margin_2x_size"
                android:layout_weight="1"
                android:background="@drawable/bg_round_button_primary"
                android:gravity="center"
                android:text="Scan"
                android:textColor="@color/white"
                android:textStyle="bold" />

            <View
                android:layout_width="10dp"
                android:layout_height="40dp"
                android:background="@android:color/white" />

            <com.seatel.mobilehall.util.customview.CustomButton
                android:id="@+id/btn_my_qr"
                android:layout_width="0dp"
                android:layout_height="@dimen/button_height"
                android:layout_marginEnd="@dimen/margin_2x_size"
                android:layout_weight="1"
                android:background="@drawable/bg_round_button_primary"
                android:gravity="center"
                android:text="My QR"
                android:textColor="@color/white"
                android:textStyle="bold"
                android:visibility="gone" />


        </LinearLayout>


    </androidx.constraintlayout.widget.ConstraintLayout>

</ScrollView>