<?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_main.mvvm.HomeViewModel" />

        <variable
            name="click"
            type="com.hongyegroup.cpt_main.ui.HomeFragment.ClickProxy" />

    </data>

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

        <com.guadou.lib_baselib.view.titlebar.StatusbarGrayView
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_46dp">

            <com.guadou.lib_baselib.font_text_view.TextViewMedium
                android:id="@+id/tv_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:text="首页"
                android:textColor="@color/black"
                android:textSize="@dimen/d_18sp"
                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_notify_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginRight="@dimen/d_15dp"
                android:contentDescription="通知列表"
                android:src="@drawable/main_title_notification_icon"
                android:visibility="visible"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                binding:clicks="@{click.gotoNotificationPage}" />

            <TextView
                android:id="@+id/tv_badge_num"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="start"
                android:layout_marginTop="@dimen/d_5dp"
                android:background="@drawable/badge_red"
                android:maxLength="2"
                android:paddingLeft="@dimen/d_4dp"
                android:paddingTop="@dimen/d_1dp"
                android:paddingRight="@dimen/d_4dp"
                android:paddingBottom="@dimen/d_1dp"
                android:textColor="@color/white"
                android:textSize="@dimen/d_10sp"
                android:visibility="gone"
                app:layout_constraintLeft_toLeftOf="@id/iv_notify_icon"
                app:layout_constraintRight_toLeftOf="@id/iv_notify_icon"
                app:layout_constraintTop_toTopOf="parent"
                tools:text="99"
                tools:visibility="visible" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <View
            android:layout_width="match_parent"
            android:layout_height="@dimen/d_0.7dp"
            android:background="@color/divider_color_ee" />

        <com.scwang.smart.refresh.layout.SmartRefreshLayout
            android:id="@+id/refresh_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:focusable="true"
            android:focusableInTouchMode="true"
            app:srlEnablePreviewInEditMode="true"
            app:srlPrimaryColor="@color/white">

            <com.scwang.smart.refresh.header.ClassicsHeader
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <androidx.core.widget.NestedScrollView
                android:id="@+id/scrollView"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fillViewport="true"
                android:scrollbars="vertical">

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

                    <!--金额和Point显示-->
                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="56dp"
                        android:layout_weight="1"
                        android:gravity="center_vertical"
                        android:orientation="horizontal"
                        binding:clicks="@{click.gotoWalletPage}">

                        <ImageView
                            android:id="@+id/icon_wallet"
                            android:layout_width="@dimen/d_28dp"
                            android:layout_height="@dimen/d_28dp"
                            android:layout_marginLeft="@dimen/d_16dp"
                            android:src="@drawable/home_top_wallet"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintLeft_toLeftOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <View
                            android:layout_width="21dp"
                            android:layout_height="10dp"
                            android:layout_marginBottom="@dimen/d_20dp"
                            android:background="@drawable/chat_new_icon"
                            app:layout_constraintBottom_toBottomOf="@id/icon_wallet"
                            app:layout_constraintLeft_toRightOf="@id/icon_wallet"
                            app:layout_constraintRight_toRightOf="@id/icon_wallet" />


                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="@dimen/d_14dp"
                            android:text="钱包"
                            android:textColor="@color/black"
                            android:textSize="@dimen/d_14sp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintLeft_toRightOf="@id/icon_wallet"
                            app:layout_constraintTop_toTopOf="parent" />

                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                            android:id="@+id/tv_wallet_money"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="@dimen/d_14dp"
                            android:layout_marginRight="@dimen/d_7dp"
                            android:text="¥ 0"
                            android:textColor="@color/black"
                            android:textSize="@dimen/d_14dsp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintRight_toLeftOf="@id/iv_back_more"
                            app:layout_constraintTop_toTopOf="parent" />

                        <ImageView
                            android:id="@+id/iv_back_more"
                            android:layout_width="5dp"
                            android:layout_height="9dp"
                            android:layout_marginLeft="@dimen/d_7dp"
                            android:layout_marginRight="@dimen/d_15dp"
                            android:src="@drawable/home_top_more"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintRight_toRightOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/d_10dp"
                        android:background="@color/divider_color_f689" />

                    <!--  分类   -->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">

                        <!--兼职-->
                        <LinearLayout
                            android:id="@+id/ll_yy_jobs"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:gravity="center_horizontal"
                            android:orientation="vertical"
                            binding:clicks="@{click.gotoParttimePage}">

                            <RelativeLayout
                                android:layout_width="@dimen/d_70dp"
                                android:layout_height="@dimen/d_70dp"
                                android:layout_marginTop="@dimen/d_16dp">

                                <ImageView
                                    android:id="@+id/iv_category_yyjobs"
                                    android:layout_width="@dimen/d_70dp"
                                    android:layout_height="@dimen/d_70dp"
                                    android:src="@drawable/home_yyjobs_categroy" />

                                <!-- 未读数量 -->
                                <View
                                    android:id="@+id/view_parttime_unread"
                                    android:layout_width="@dimen/d_8dp"
                                    android:layout_height="@dimen/d_8dp"
                                    android:layout_alignParentRight="true"
                                    android:background="@drawable/shape_circle_red"
                                    android:gravity="center"
                                    android:textColor="@color/white"
                                    android:visibility="gone" />

                            </RelativeLayout>

                            <com.guadou.lib_baselib.font_text_view.TextViewBold
                                android:id="@+id/tv_category_parttime"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="@dimen/d_3dp"
                                android:text="兼职工作"
                                android:textColor="@color/black"
                                android:textSize="@dimen/d_14dsp" />

                        </LinearLayout>

                        <!--News Feed-->
                        <LinearLayout
                            android:id="@+id/ll_news_feed"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:gravity="center_horizontal"
                            android:orientation="vertical"
                            binding:clicks="@{click.gotoNewsFeedTab}">

                            <RelativeLayout
                                android:layout_width="@dimen/d_70dp"
                                android:layout_height="@dimen/d_70dp"
                                android:layout_marginTop="@dimen/d_16dp">

                                <ImageView
                                    android:id="@+id/iv_category_newsfeed"
                                    android:layout_width="@dimen/d_70dp"
                                    android:layout_height="@dimen/d_70dp"
                                    android:src="@drawable/home_newsfeed_categroy" />

                                <!-- NewsFeed未读提示-->
                                <View
                                    android:id="@+id/view_newsfeed_unread"
                                    android:layout_width="@dimen/d_8dp"
                                    android:layout_height="@dimen/d_8dp"
                                    android:layout_alignParentRight="true"
                                    android:background="@drawable/shape_circle_red"
                                    android:gravity="center"
                                    android:textColor="@color/white"
                                    android:visibility="gone" />

                                <!-- NewsFeed未读数量-->
                                <TextView
                                    android:id="@+id/tv_newsfeed_replay_count"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_alignParentRight="true"
                                    android:background="@drawable/badge_red"
                                    android:paddingLeft="@dimen/d_6dp"
                                    android:paddingTop="@dimen/d_1dp"
                                    android:paddingRight="@dimen/d_6dp"
                                    android:paddingBottom="@dimen/d_1dp"
                                    android:text="0"
                                    android:textColor="@color/white"
                                    android:textSize="8sp"
                                    android:visibility="gone" />

                            </RelativeLayout>

                            <com.guadou.lib_baselib.font_text_view.TextViewBold
                                android:id="@+id/tv_category_news_feed"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="@dimen/d_3dp"
                                android:text="朋友圈"
                                android:textColor="@color/black"
                                android:textSize="@dimen/d_14dsp" />

                        </LinearLayout>

                        <!--Rewards-->
                        <LinearLayout
                            android:id="@+id/ll_rewards"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:gravity="center_horizontal"
                            android:orientation="vertical"
                            binding:clicks="@{click.gotoRewardsPage}">

                            <RelativeLayout
                                android:layout_width="@dimen/d_70dp"
                                android:layout_height="@dimen/d_70dp"
                                android:layout_marginTop="@dimen/d_16dp">

                                <ImageView
                                    android:id="@+id/iv_category_rewards"
                                    android:layout_width="@dimen/d_70dp"
                                    android:layout_height="@dimen/d_70dp"
                                    android:src="@drawable/home_rewards_categroy" />

                                <View
                                    android:id="@+id/view_rewards_unread"
                                    android:layout_width="@dimen/d_8dp"
                                    android:layout_height="@dimen/d_8dp"
                                    android:layout_alignParentRight="true"
                                    android:background="@drawable/shape_circle_red"
                                    android:gravity="center"
                                    android:textColor="@color/white"
                                    android:visibility="gone" />

                            </RelativeLayout>


                            <com.guadou.lib_baselib.font_text_view.TextViewBold
                                android:id="@+id/tv_category_rewards"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_marginTop="@dimen/d_3dp"
                                android:text="积分兑换"
                                android:textColor="@color/black"
                                android:textSize="@dimen/d_14dsp" />

                        </LinearLayout>

                    </LinearLayout>

                    <!--轮播-->
                    <com.minminaya.widget.GeneralRoundConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_15dp"
                        android:layout_marginTop="@dimen/d_18dp"
                        android:layout_marginRight="@dimen/d_15dp"
                        app:corner_radius="@dimen/d_5dp">

                        <com.youth.banner.Banner
                            android:id="@+id/banner"
                            android:layout_width="match_parent"
                            android:layout_height="0dp"
                            android:background="@drawable/placeholder_img_banner"

                            app:banner_auto_loop="true"
                            app:banner_indicator_height="@dimen/d_5dp"
                            app:banner_indicator_marginBottom="-3dp"
                            app:banner_indicator_normal_color="@color/white"
                            app:banner_indicator_normal_width="@dimen/d_7dp"
                            app:banner_indicator_radius="@dimen/d_15dp"
                            app:banner_indicator_selected_color="@color/page_bg"
                            app:banner_indicator_selected_width="@dimen/d_17dp"
                            app:banner_loop_time="5000"

                            app:layout_constraintDimensionRatio="690:305"
                            tools:ignore="MissingConstraints" />

                    </com.minminaya.widget.GeneralRoundConstraintLayout>


                    <!-- 热门 -->
                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_15dp"
                        android:layout_marginTop="@dimen/d_18dp"
                        android:layout_weight="1"
                        android:drawableRight="@drawable/home_part_job_more"
                        android:drawablePadding="@dimen/d_11dp"
                        android:text="热门兼职工作"
                        android:textColor="@color/black"
                        android:textSize="@dimen/d_17sp"
                        binding:clicks="@{click.gotoParttimePage}" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_hot_job"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_12dp"
                        android:layout_marginTop="@dimen/d_15dp"
                        android:overScrollMode="never" />

                    <!-- 当地市的工作 -->
                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_15dp"
                        android:layout_marginTop="@dimen/d_18dp"
                        android:layout_weight="1"
                        android:drawableRight="@drawable/home_part_job_more"
                        android:drawablePadding="@dimen/d_11dp"
                        android:text="在武汉的工作"
                        android:textColor="@color/black"
                        android:textSize="@dimen/d_17sp"
                        binding:clicks="@{click.gotoParttimePage}" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_city_job"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_12dp"
                        android:layout_marginTop="@dimen/d_15dp"
                        android:overScrollMode="never" />

                    <!-- 当地区域的工作 -->
                    <com.guadou.lib_baselib.font_text_view.TextViewMedium
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_15dp"
                        android:layout_marginTop="@dimen/d_18dp"
                        android:layout_weight="1"
                        android:drawableRight="@drawable/home_part_job_more"
                        android:drawablePadding="@dimen/d_11dp"
                        android:text="在东西湖区的工作"
                        android:textColor="@color/black"
                        android:textSize="@dimen/d_17sp"
                        binding:clicks="@{click.gotoParttimePage}" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_area_job"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_12dp"
                        android:layout_marginTop="@dimen/d_15dp"
                        android:overScrollMode="never" />

                    <!--Job Tips-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/d_18dp"
                        android:gravity="center_vertical"
                        android:orientation="horizontal"
                        binding:clicks="@{click.gotoBulletinBoardPage}">

                        <com.guadou.lib_baselib.font_text_view.TextViewMedium
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="@dimen/d_15dp"
                            android:layout_weight="1"
                            android:text="YY 公告栏"
                            android:textColor="@color/black"
                            android:textSize="@dimen/d_17sp" />

                        <com.guadou.lib_baselib.font_text_view.TextViewRegular
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginRight="@dimen/d_15dp"
                            android:text="查看全部"
                            android:textColor="@color/text_blue_3779ff"
                            android:textSize="@dimen/d_14sp" />

                    </LinearLayout>

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/rv_job_tips"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/d_12dp"
                        android:layout_marginTop="@dimen/d_13dp"
                        android:overScrollMode="never" />

                    <View
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/d_10dp" />

                </LinearLayout>

            </androidx.core.widget.NestedScrollView>

        </com.scwang.smart.refresh.layout.SmartRefreshLayout>

    </LinearLayout>


</layout>
