<?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="match_parent"
    tools:context=".view.fragment.MaterialInspectionPlanFragment">

    <com.grkj.iscs_mc.view.widget.TitleBar
        android:id="@+id/tb"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:bar_icon="@mipmap/material_inspection_plan"
        app:bar_title="@string/material_inspection_plan" />

    <com.grkj.iscs_mc.view.widget.CommonBtn
        android:id="@+id/cb_back"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignParentBottom="true"
        app:btn_bg="@drawable/common_btn_blue_bg"
        app:btn_name="@string/back" />

    <com.grkj.iscs_mc.view.widget.CommonBtn
        android:id="@+id/cb_start"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="@dimen/common_spacing"
        android:layout_toLeftOf="@id/cb_back"
        android:visibility="gone"
        app:btn_bg="@drawable/common_btn_red_bg"
        app:btn_name="@string/start_inspection" />

    <com.grkj.iscs_mc.view.widget.CommonBtn
        android:id="@+id/cb_continue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="@dimen/common_spacing"
        android:layout_toLeftOf="@id/cb_start"
        android:visibility="gone"
        app:btn_bg="@drawable/common_btn_yellow_bg"
        app:btn_name="@string/continue_inspection" />

    <com.grkj.iscs_mc.view.widget.CommonBtn
        android:id="@+id/cb_submit"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_marginRight="@dimen/common_spacing"
        android:layout_toLeftOf="@id/cb_continue"
        android:visibility="gone"
        app:btn_bg="@drawable/common_btn_red_bg"
        app:btn_name="@string/submit_result" />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/cb_back"
        android:layout_below="@id/tb"
        android:layout_marginVertical="@dimen/common_spacing"
        android:background="@drawable/item_rv_technology_sop_bg_normal"
        android:padding="@dimen/common_spacing_small">

        <TextView
            android:id="@+id/tv_title"
            style="@style/CommonTextView"
            android:layout_marginTop="@dimen/common_spacing_small" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true">

            <com.grkj.iscs_mc.view.widget.CommonBtn
                android:id="@+id/cb_sign"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:visibility="gone"
                app:btn_bg="@drawable/common_btn_green_bg"
                app:btn_name="@string/sign"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <ImageView
                android:id="@+id/iv_sign"
                android:layout_width="0dp"
                android:layout_height="0dp"
                app:layout_constraintBottom_toBottomOf="@id/cb_sign"
                app:layout_constraintLeft_toLeftOf="@id/cb_sign"
                app:layout_constraintRight_toRightOf="@id/cb_sign"
                app:layout_constraintTop_toTopOf="@id/cb_sign" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <com.google.android.material.card.MaterialCardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/tv_title"
            android:layout_marginVertical="@dimen/common_spacing"
            app:cardBackgroundColor="@color/common_bg_white_10"
            app:cardCornerRadius="@dimen/common_radius"
            app:cardElevation="0dp"
            app:strokeColor="@color/common_transparent">

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

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@color/common_bg_white_10"
                    android:orientation="horizontal">

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/material_type" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/total_count" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/borrowed_count" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/to_be_inspected_count" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/normal_count" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/expired_count" />

                    <View
                        android:layout_width="@dimen/divider_line_width"
                        android:layout_height="match_parent"
                        android:background="@color/main_color" />

                    <TextView
                        style="@style/CommonTextView"
                        android:layout_width="0dp"
                        android:layout_weight="1"
                        android:paddingVertical="@dimen/common_spacing"
                        android:text="@string/damaged_count" />
                </LinearLayout>

                <View
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/divider_line_width"
                    android:background="@color/main_color" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_material_inspection_plan"
                    style="@style/CommonRecyclerView"
                    android:layout_height="wrap_content" />
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
    </RelativeLayout>
</RelativeLayout>