<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout 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/trend_home_swl"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/trends_home_appBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#F4F4F5"
            android:orientation="vertical"
            app:elevation="0dp"
            app:layout_behavior="com.yidianling.dynamic.common.behavior.AppBarLayoutBehavior">

            <com.google.android.material.appbar.CollapsingToolbarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layout_scrollFlags="scroll|exitUntilCollapsed">

                <com.yidianling.dynamic.trendsHome.view.TrendsHomeBannerView
                    android:id="@+id/v_banner"
                    android:layout_width="match_parent"
                    android:layout_height="160dp"
                    app:layout_scrollFlags="scroll|enterAlways" />
                <!--<ImageView-->
                <!--android:id="@+id/iv_background"-->
                <!--android:layout_width="match_parent"-->
                <!--android:layout_height="160dp"-->
                <!--android:background="@drawable/dynamic_trends_banner"-->
                <!--app:layout_scrollFlags="scroll|enterAlways" />-->


                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/trends_home_csl"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="160dp"
                    android:background="@color/dynamic_white"
                    android:paddingTop="25dp"
                    app:layout_scrollFlags="scroll|enterAlways">

                    <TextView
                        android:id="@+id/trends_tv_mind_group"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="15dp"
                        android:drawableLeft="@drawable/dynamic_minds_group"
                        android:drawablePadding="5dp"
                        android:text="心事群"
                        android:textColor="#666666"
                        android:textSize="@dimen/dynamic_text_size_16"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/trends_tv_mind_more"
                        android:layout_width="40dp"
                        android:layout_height="20dp"
                        android:layout_marginRight="15dp"
                        android:background="@drawable/dynamic_bg_radius_line_gray_20"
                        android:gravity="center"
                        android:text=" 更多 "
                        android:textColor="@color/_9"
                        android:textSize="@dimen/dynamic_default_text_size_little"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="@+id/trends_tv_mind_group" />


                    <androidx.cardview.widget.CardView
                        android:id="@+id/cardview"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="10dp"
                        android:elevation="0dp"
                        app:cardCornerRadius="3dp"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/trends_tv_mind_group">

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

                            <FrameLayout
                                android:id="@+id/frl_topic_iv1"
                                android:layout_width="@dimen/dynamic_topic_banner_iv1_w"
                                android:layout_height="@dimen/dynamic_topic_banner_iv1_h"

                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent">

                                <ImageView
                                    android:id="@+id/trends_topic_iv1"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:scaleType="centerCrop"
                                    tools:background="@color/dynamic_colorAccent" />

                                <TextView
                                    android:id="@+id/trends_topic_tv1"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="bottom"
                                    android:layout_marginLeft="13dp"
                                    android:layout_marginBottom="9dp"
                                    android:text="#情绪压力那些事#"
                                    android:textColor="@color/dynamic_white"
                                    android:textSize="12sp" />

                            </FrameLayout>

                            <FrameLayout
                                android:id="@+id/frl_topic_iv2"
                                android:layout_width="@dimen/dynamic_topic_banner_iv2_3_w"
                                android:layout_height="@dimen/dynamic_topic_banner_iv2_3_h"
                                android:layout_marginLeft="1dp"
                                app:layout_constraintStart_toEndOf="@+id/frl_topic_iv1"
                                app:layout_constraintTop_toTopOf="parent">

                                <ImageView
                                    android:id="@+id/trends_topic_iv2"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:scaleType="centerCrop"
                                    tools:background="@color/dynamic_colorAccent" />

                                <TextView
                                    android:id="@+id/trends_topic_tv2"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="bottom"
                                    android:layout_marginLeft="13dp"
                                    android:layout_marginBottom="9dp"
                                    android:text="#情绪压力那些事#"
                                    android:textColor="@color/dynamic_white"
                                    android:textSize="12sp" />

                            </FrameLayout>

                            <FrameLayout
                                android:id="@+id/frl_topic_iv3"
                                android:layout_width="@dimen/dynamic_topic_banner_iv2_3_w"
                                android:layout_height="@dimen/dynamic_topic_banner_iv2_3_h"
                                android:layout_marginLeft="1dp"
                                android:layout_marginTop="1dp"
                                app:layout_constraintLeft_toRightOf="@+id/frl_topic_iv1"
                                app:layout_constraintTop_toBottomOf="@+id/frl_topic_iv2">

                                <ImageView
                                    android:id="@+id/trends_topic_iv3"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:scaleType="centerCrop"
                                    tools:background="@color/dynamic_colorAccent" />

                                <TextView
                                    android:id="@+id/trends_topic_tv3"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_gravity="bottom"
                                    android:layout_marginLeft="13dp"
                                    android:layout_marginBottom="9dp"
                                    android:text="#情绪压力那些事#"
                                    android:textColor="@color/dynamic_white"
                                    android:textSize="12sp" />

                            </FrameLayout>

                        </androidx.constraintlayout.widget.ConstraintLayout>

                    </androidx.cardview.widget.CardView>


                    <com.yidianling.dynamic.common.view.LooperTextView
                        android:id="@+id/ternd_loop_tv"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="15dp"
                        android:layout_marginBottom="10dp"
                        android:minHeight="45dp"
                        android:textColor="#FAA05A"
                        app:layout_constraintTop_toBottomOf="@+id/cardview"
                        app:layout_scrollFlags="scroll|enterAlways" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar_tv"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/title_bar_height"
                    android:alpha="1"
                    android:background="@color/platform_main_theme"
                    app:layout_collapseMode="pin">


                    <TextView
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginRight="15dp"
                        android:gravity="center"
                        android:text="问答"
                        android:textColor="@color/platform_but_text_color"
                        android:textSize="20sp" />


                </androidx.appcompat.widget.Toolbar>

            </com.google.android.material.appbar.CollapsingToolbarLayout>


            <LinearLayout
                android:id="@+id/trend_detail_type_lin"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/dynamic_white"
                android:gravity="center_horizontal"
                android:orientation="horizontal"
                android:paddingLeft="15dp"
                android:paddingTop="25dp"
                android:paddingRight="15dp"
                android:paddingBottom="15dp">


                <TextView
                    android:id="@+id/item_hot_tv"
                    android:layout_width="0dp"
                    android:layout_height="35dp"
                    android:layout_centerInParent="true"
                    android:layout_marginRight="1dp"
                    android:layout_weight="1"
                    android:background="@drawable/dynamic_selector_bg_hot"
                    android:gravity="center"
                    android:paddingLeft="15dp"
                    android:paddingRight="15dp"
                    android:text="推荐"
                    android:textColor="@color/dynamic_text_666666"
                    android:textSize="15sp" />


                <TextView
                    android:id="@+id/item_recommend_tv"
                    android:layout_width="0dp"
                    android:layout_height="35dp"
                    android:layout_marginRight="1dp"
                    android:layout_weight="1"
                    android:background="@drawable/dynamic_selector_bg_recommend"
                    android:gravity="center"
                    android:paddingLeft="15dp"
                    android:paddingRight="15dp"
                    android:text="最新"
                    android:textColor="#666666"
                    android:textSize="15sp" />

                <TextView
                    android:id="@+id/item_focus_tv"
                    android:layout_width="0dp"
                    android:layout_height="35dp"
                    android:layout_weight="1"
                    android:background="@drawable/dynamic_selector_bg_focus"
                    android:gravity="center"
                    android:paddingLeft="15dp"
                    android:paddingRight="15dp"
                    android:text="关注"
                    android:textColor="#666666"
                    android:textSize="15sp" />

            </LinearLayout>

        </com.google.android.material.appbar.AppBarLayout>


        <androidx.viewpager.widget.ViewPager
            android:id="@+id/vp_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />


        <com.google.android.material.floatingactionbutton.FloatingActionButton
            android:id="@+id/publish_trend_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|right"
            android:layout_marginRight="20dp"
            android:layout_marginBottom="40dp"
            android:elevation="3dp"
            android:src="@drawable/dynamic_publish_trend"
            app:backgroundTint="@color/platform_main_theme"
            app:borderWidth="0dp"
            app:fabSize="normal" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
