<?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:id="@+id/linearLayout3"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/light_gray">

    <LinearLayout
        android:id="@+id/linearLayout4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@color/light_gray"
        android:orientation="vertical"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/textView"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:background="@color/gray"
            android:gravity="center"
            android:text="@string/dispatch_progress"
            android:textColor="@color/black"
            android:textSize="20sp"
            android:textStyle="bold" />

        <LinearLayout
            android:id="@+id/linearLayout"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_marginBottom="1dp"
            android:visibility="gone"
            android:background="@color/white"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1.15"
                android:gravity="center"
                android:text="@string/shipping_goods"
                android:textColor="@color/error"
                android:textSize="30sp"
                android:textStyle="bold" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:background="@color/background"
            android:gravity="center"
            android:orientation="vertical">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:background="@null"
                android:scaleType="fitCenter"
                android:visibility="gone"
                app:srcCompat="@drawable/dispatch_wait" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recyclerDialogDispatchList"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="1dp"
            android:layout_marginEnd="1dp"
            android:background="@color/cardSurface"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="5dp"
                android:paddingBottom="5dp"
                android:gravity="center"
                android:background="@color/primary"
                android:text="@string/processing"
                android:textSize="20sp"
                android:textColor="@color/onPrimary" />

            <ImageView
                android:id="@+id/imageProductPicture"
                android:layout_width="match_parent"
                android:layout_height="240dp"
                android:adjustViewBounds="true"
                android:scaleType="fitCenter"
                android:paddingTop="5dp"
                android:paddingBottom="5dp"
                android:paddingLeft="20dp"
                android:paddingRight="20dp"
                android:src="@drawable/default_product" />

            <TextView
                android:id="@+id/textProductName"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:gravity="center"
                android:text="@string/product_name"
                android:textSize="24sp"
                android:textColor="@color/black" />

            <TextView
                android:id="@+id/dispatchtips"
                android:layout_width="match_parent"
                android:layout_height="180dp"
                android:gravity="center"
                android:text="@string/pick_up_goods_within_15_seconds_after_pick_up_port_opened"
                android:textSize="65sp"
                android:textColor="@color/primary" />

            <Button
                android:id="@+id/buttonOk"
                android:layout_width="match_parent"
                android:layout_height="50dp"
                android:backgroundTint="@color/warning"
                android:text="@string/cancel_40"
                android:textSize="20sp"
                android:textColor="@color/onWarning" />

        </LinearLayout>

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

        <!-- 包住圖片 + 倒數文字 -->
        <FrameLayout
            android:layout_width="720dp"
            android:layout_height="1280dp"
            android:layout_gravity="center">

            <ImageView
                android:id="@+id/imgDeliveryFailed"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:visibility="gone"
                android:src="@drawable/qrcode_msg"
                android:scaleType="fitXY" />

            <TextView
                android:id="@+id/tvCountdown"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text=""
                android:textColor="#FFFFFF"
                android:textSize="30sp"
                android:visibility="gone"
                android:layout_gravity="bottom|end"
                android:layout_marginEnd="10dp"
                android:layout_marginBottom="60dp" />
        </FrameLayout>
    </FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>