<?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.MaterialHomeFragment">

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

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/tb"
        android:layout_marginBottom="50dp"
        android:background="@drawable/item_rv_technology_sop_bg_normal">

        <RelativeLayout
            android:id="@+id/rl_module_fetch_return"
            android:layout_width="@dimen/home_module_width"
            android:layout_height="@dimen/home_module_height"
            android:background="@drawable/module_fetch_return_bg"
            android:padding="@dimen/common_spacing"
            app:layout_constraintBottom_toTopOf="@id/rl_module_inspection"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@id/rl_module_instruction"
            app:layout_constraintTop_toTopOf="parent">

            <RelativeLayout
                android:id="@+id/rl_fetch_return_num"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_alignParentRight="true"
                android:background="@drawable/home_page_num_bg"
                android:visibility="gone">

                <TextView
                    android:id="@+id/tv_fetch_return_num"
                    style="@style/CommonTextView"
                    android:layout_centerInParent="true" />
            </RelativeLayout>

            <ImageView
                android:layout_width="@dimen/home_module_icon_size"
                android:layout_height="@dimen/home_module_icon_size"
                android:layout_centerVertical="true"
                android:src="@mipmap/material_fetch_return" />

            <TextView
                android:id="@+id/tv_fetch_return_name"
                style="@style/CommonTextView"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="@string/material_fetch_return"
                android:textSize="@dimen/common_text_size_big" />

            <TextView
                style="@style/CommonTextView"
                android:layout_below="@id/tv_fetch_return_name"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginTop="@dimen/common_spacing_small"
                android:text="@string/material_fetch_return_english"
                android:textSize="@dimen/common_text_size_small" />
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/rl_module_instruction"
            android:layout_width="@dimen/home_module_width"
            android:layout_height="@dimen/home_module_height"
            android:background="@drawable/module_instruction_bg"
            android:padding="@dimen/common_spacing"
            app:layout_constraintBottom_toTopOf="@id/rl_module_replacement"
            app:layout_constraintLeft_toRightOf="@id/rl_module_fetch_return"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <ImageView
                android:layout_width="@dimen/home_module_icon_size"
                android:layout_height="@dimen/home_module_icon_size"
                android:layout_centerVertical="true"
                android:src="@mipmap/material_instruction" />

            <TextView
                android:id="@+id/tv_instruction_name"
                style="@style/CommonTextView"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="@string/material_instruction"
                android:textSize="@dimen/common_text_size_big" />

            <TextView
                style="@style/CommonTextView"
                android:layout_below="@id/tv_instruction_name"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginTop="@dimen/common_spacing_small"
                android:text="@string/material_instruction_english"
                android:textSize="@dimen/common_text_size_small" />
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/rl_module_inspection"
            android:layout_width="@dimen/home_module_width"
            android:layout_height="@dimen/home_module_height"
            android:background="@drawable/module_inspection_bg"
            android:padding="@dimen/common_spacing"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toLeftOf="@id/rl_module_replacement"
            app:layout_constraintTop_toBottomOf="@id/rl_module_fetch_return">

            <RelativeLayout
                android:id="@+id/rl_inspection_num"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_alignParentRight="true"
                android:background="@drawable/home_page_num_bg"
                android:visibility="gone">

                <TextView
                    android:id="@+id/tv_inspection_num"
                    style="@style/CommonTextView"
                    android:layout_centerInParent="true" />
            </RelativeLayout>

            <ImageView
                android:layout_width="@dimen/home_module_icon_size"
                android:layout_height="@dimen/home_module_icon_size"
                android:layout_centerVertical="true"
                android:src="@mipmap/material_inspection" />

            <TextView
                android:id="@+id/tv_inspection_name"
                style="@style/CommonTextView"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="@string/material_inspection"
                android:textSize="@dimen/common_text_size_big" />

            <TextView
                style="@style/CommonTextView"
                android:layout_below="@id/tv_inspection_name"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginTop="@dimen/common_spacing_small"
                android:text="@string/material_inspection_english"
                android:textSize="@dimen/common_text_size_small" />
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/rl_module_replacement"
            android:layout_width="@dimen/home_module_width"
            android:layout_height="@dimen/home_module_height"
            android:background="@drawable/module_replacement_bg"
            android:padding="@dimen/common_spacing"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toRightOf="@id/rl_module_inspection"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@id/rl_module_instruction">

            <RelativeLayout
                android:id="@+id/rl_replacement_num"
                android:layout_width="20dp"
                android:layout_height="20dp"
                android:layout_alignParentRight="true"
                android:background="@drawable/home_page_num_bg"
                android:visibility="gone">

                <TextView
                    android:id="@+id/tv_replacement_num"
                    style="@style/CommonTextView"
                    android:layout_centerInParent="true" />
            </RelativeLayout>

            <ImageView
                android:layout_width="@dimen/home_module_icon_size"
                android:layout_height="@dimen/home_module_icon_size"
                android:layout_centerVertical="true"
                android:src="@mipmap/material_replacement" />

            <TextView
                android:id="@+id/tv_replacement_name"
                style="@style/CommonTextView"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:text="@string/material_replacement"
                android:textSize="@dimen/common_text_size_big" />

            <TextView
                style="@style/CommonTextView"
                android:layout_below="@id/tv_replacement_name"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_marginTop="@dimen/common_spacing_small"
                android:text="@string/material_replacement_english"
                android:textSize="@dimen/common_text_size_small" />
        </RelativeLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <com.grkj.iscs_mc.view.widget.ExpandableTabLayout
        android:id="@+id/etl_type"
        android:layout_width="match_parent"
        android:layout_height="@dimen/expandable_tab_collapse_height"
        android:layout_alignParentBottom="true"
        app:expand_direction="upwards"
        app:expand_title="@string/home_status_bar_title" />
</RelativeLayout>