<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:binding="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    tools:ignore="RtlHardcoded">

    <data>

        <variable
            name="viewModel"
            type="com.hongyegroup.cpt_parttime.mvvm.PartTimeJobDetailViewModel" />

        <variable
            name="click"
            type="com.hongyegroup.cpt_parttime.ui.PartTimeJobDetailActivity.ClickProxy" />

        <import type="android.text.TextUtils" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        android:orientation="vertical">

        <androidx.constraintlayout.motion.widget.MotionLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            app:layoutDescription="@xml/scene_part_job_detail">

            <!--   顶部的图片    -->
            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_top_img_box"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <ImageView
                    android:id="@+id/iv_job_image"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:background="@color/gray"
                    android:scaleType="centerCrop"
                    app:layout_constraintDimensionRatio="W,219:375"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <!-- 相册布局 -->
            <LinearLayout
                android:id="@+id/ll_gallery_box"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginRight="@dimen/d_15dp"
                android:layout_marginBottom="@dimen/d_10dp"
                android:background="@drawable/shape_job_detail_gallery_box"
                android:gravity="center"
                android:orientation="horizontal"
                app:layout_constraintBottom_toBottomOf="@id/cl_top_img_box"
                app:layout_constraintRight_toRightOf="@id/cl_top_img_box"
                binding:clicks="@{click.gotoGalleryPage}">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/job_detail_gallery_icon"
                    android:drawablePadding="@dimen/d_7dp"
                    android:paddingLeft="@dimen/d_10dp"
                    android:paddingTop="@dimen/d_6dp"
                    android:paddingRight="@dimen/d_10dp"
                    android:paddingBottom="@dimen/d_6dp"
                    android:text="相册"
                    android:textColor="@color/white"
                    android:textSize="@dimen/d_14sp" />

            </LinearLayout>

            <!--   固定的状态栏 用于定位     -->
            <com.guadou.lib_baselib.view.titlebar.StatusbarGrayView
                android:id="@+id/status_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <!--   返回栏    -->
            <FrameLayout
                android:id="@+id/back_layout"
                android:layout_width="match_parent"
                android:layout_height="@dimen/d_40dp"
                android:background="@color/transparent"
                tools:layout_editor_absoluteY="24dp">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginLeft="@dimen/d_14dp"
                    android:layout_marginTop="@dimen/d_2dp"
                    android:src="@mipmap/back_white_icon" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical|right"
                    android:layout_marginRight="@dimen/d_15dp"
                    android:src="@drawable/part_detail_job_collect_icon" />

            </FrameLayout>

            <!--  工作信息等TextView    -->
            <com.guadou.lib_baselib.font_text_view.TextViewBold
                android:id="@+id/tv_job_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/d_15dp"
                android:layout_marginTop="@dimen/d_5dp"
                android:ellipsize="end"
                android:gravity="center"
                android:lines="1"
                android:singleLine="true"
                android:text="斗鱼主播招聘"
                android:textColor="@color/white"
                android:textSize="@dimen/d_20sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/back_layout" />

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:id="@+id/tv_job_employer"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/d_15dp"
                android:layout_marginTop="@dimen/d_10dp"
                android:text="武汉斗鱼网络科技有限公司"
                android:textColor="@color/white"
                android:textSize="@dimen/d_14sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_job_title" />

            <com.guadou.lib_baselib.font_text_view.TextViewBold
                android:id="@+id/tv_job_hour"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/d_15dp"
                android:layout_marginTop="@dimen/d_10dp"
                android:text="100元/小时"
                android:textColor="@color/text_orange"
                android:textSize="@dimen/d_16sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_job_employer" />

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:id="@+id/tv_job_industry"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/d_15dp"
                android:layout_marginTop="@dimen/d_8dp"
                android:text="江岸 | 主播"
                android:textColor="@color/white"
                android:textSize="@dimen/d_14sp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_job_hour" />

            <!--   Tab布局     -->
            <FrameLayout
                android:id="@+id/tab_layout_box"
                android:layout_width="match_parent"
                android:layout_height="@dimen/d_40dp">

                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tabLayout"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/d_40dp"
                    android:background="@color/white"
                    app:tabIndicator="@drawable/shape_blue_bottom_line_3conner"
                    app:tabIndicatorColor="@color/app_blue"
                    app:tabIndicatorFullWidth="false"
                    app:tabIndicatorHeight="@dimen/d_2dp"
                    app:tabMode="scrollable"
                    app:tabRippleColor="@color/transparent"
                    app:tabSelectedTextColor="@color/app_blue"
                    app:tabTextColor="@color/black" />

                <ImageView
                    android:id="@+id/iv_tab_right"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="right"
                    android:src="@drawable/job_detail_tab_right_arrow"
                    binding:clicks="@{click.tabNext}" />

            </FrameLayout>

            <!--   Fragment容器     -->
            <androidx.viewpager.widget.ViewPager
                android:id="@+id/view_pager"
                android:layout_width="match_parent"
                android:layout_height="0dp" />


        </androidx.constraintlayout.motion.widget.MotionLayout>

        <!-- 底部按钮组容器 -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            binding:isVisibleGone="@{click.isShowBottomBtn}">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="@dimen/d_45dp"
                android:orientation="horizontal">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="@color/part_share_btn_bg"
                    android:gravity="center"
                    android:orientation="horizontal"
                    binding:clicks="@{click.shareJob}">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/part_share_icon" />

                    <com.guadou.lib_baselib.font_text_view.TextViewBold
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_10dp"
                        android:gravity="center"
                        android:text="分享"
                        android:textColor="@color/profile_red"
                        android:textSize="@dimen/d_17sp" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="2"
                    android:background="@color/profile_red"
                    android:gravity="center"
                    android:orientation="horizontal"
                    binding:clicks="@{click.applyJob}">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/part_apply_icon" />

                    <com.guadou.lib_baselib.font_text_view.TextViewBold
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_10dp"
                        android:gravity="center"
                        android:text="立即申请"
                        android:textColor="@color/white"
                        android:textSize="@dimen/d_17sp" />

                </LinearLayout>

            </LinearLayout>

        </FrameLayout>

    </LinearLayout>

</layout>
