zguop/banner

当前正在轮播,跳转到其他页面,再返回来,轮播图会卡在第一到第二章之间怎么解决呢?

roybill opened this issue · 3 comments

当前正在轮播,跳转到其他页面,再返回来,轮播图会卡在第一到第二章之间怎么解决呢?
zguop commented

v1 还是 v2
你是recyclerview中使用吗,可以尝试把它当做一个item处理

V1,V2是啥?? 不是在RV中,是在一个类似ScrollView的父容器内,布局是这样的:

<androidx.constraintlayout.widget.ConstraintLayout 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">

<com.scwang.smartrefresh.layout.SmartRefreshLayout
    android:id="@+id/srl_home"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.scwang.smartrefresh.layout.header.ClassicsHeader
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:srlAccentColor="@color/white"
        app:srlPrimaryColor="@color/new_main" />

    <com.donkingliang.consecutivescroller.ConsecutiveScrollerLayout
        android:id="@+id/csl_home"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#F5F5F5"
        app:isPermanent="true">

        <!--1.1带定位的顶部-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/cl_home_with_location"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FE7D01"
            android:padding="4dp">

            <TextView
                android:id="@+id/tv_location"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:drawableRight="@mipmap/arrow_down_white"
                android:drawablePadding="2dp"
                android:padding="8dp"
                android:text="定位中"
                android:textColor="@color/white"
                android:textSize="15dp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <ImageView
                android:id="@+id/iv_home_message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="10dp"
                android:src="@mipmap/bell_white"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_home_search"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@drawable/home_shape"
                android:padding="10dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintHorizontal_weight="5"
                app:layout_constraintLeft_toRightOf="@id/tv_location"
                app:layout_constraintRight_toLeftOf="@id/iv_home_message"
                app:layout_constraintTop_toTopOf="parent">

                <ImageView
                    android:id="@+id/iv_search_temp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="5dp"
                    android:src="@mipmap/search"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.gongwen.marqueen.MarqueeView
                    android:id="@+id/mv_home_location"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="4dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintLeft_toRightOf="@id/iv_search_temp"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <!--1.2 无定位的顶部-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/cl_home_no_location"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/home_shape"
            android:paddingLeft="12dp"
            android:paddingTop="4dp"
            android:paddingRight="12dp"
            android:paddingBottom="4dp"
            android:visibility="gone"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_isSticky="true">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_home_no_location_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/home_no_location_shape"
                android:padding="10dp"
                app:layout_constraintTop_toTopOf="parent">

                <ImageView
                    android:id="@+id/iv_search_temp_two"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="5dp"
                    android:src="@mipmap/search"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.gongwen.marqueen.MarqueeView
                    android:id="@+id/mv_home_no_location_search"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="4dp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintLeft_toRightOf="@id/iv_search_temp_two"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

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

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="140dp"
                android:background="#FE7D01"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/tv_temp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="12dp"
                    android:text="热搜: "
                    android:textColor="@color/white"
                    android:textSize="12dp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_home_hot_search"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="4dp"
                    app:layout_constraintLeft_toRightOf="@id/tv_temp"
                    app:layout_constraintTop_toTopOf="@id/tv_temp" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <com.to.aboomy.banner.Banner
                android:id="@+id/banner_home_top"
                android:layout_width="match_parent"
                android:layout_height="170dp"
                app:layout_constraintBottom_toBottomOf="parent" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--2.兰筑服务-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="12dp"
            android:background="@drawable/home_shape">

            <TextView
                android:id="@+id/tv_temp_two"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingLeft="12dp"
                android:paddingTop="12dp"
                android:text="兰筑服务"
                android:textColor="#222222"
                android:textSize="14dp"
                android:textStyle="bold"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tv_temp_three"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:paddingLeft="12dp"
                android:text="一站式房地产全流程开发服务"
                android:textColor="#999999"
                android:textSize="10dp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_two" />

            <TextView
                android:id="@+id/tv_home_service_more"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:layout_marginRight="12dp"
                android:drawableRight="@mipmap/right_arrow_small"
                android:drawablePadding="2dp"
                android:padding="5dp"
                android:text="查看全部"
                android:textColor="#666666"
                android:textSize="10dp"
                app:layout_constraintBottom_toBottomOf="@id/tv_temp_two"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tv_temp_two" />

            <!--        <HorizontalScrollView-->
            <!--            android:layout_width="match_parent"-->
            <!--            android:layout_height="wrap_content"-->
            <!--            android:scrollbarSize="3dp"-->
            <!--            android:scrollbarThumbHorizontal="@drawable/home_scrollbar_shape"-->
            <!--            android:scrollbarTrackHorizontal="@drawable/home_scrollbar_background_shape"-->
            <!--            app:layout_constraintTop_toBottomOf="@id/tv_temp_three">-->

            <HorizontalScrollView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scrollbars="none"
                android:visibility="gone"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_three">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv_home_grid"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

            </HorizontalScrollView>

            <!--2.1 表格列表-->
            <com.to.aboomy.banner.Banner
                android:id="@+id/banner_home_grid"
                android:layout_width="match_parent"
                android:layout_height="170dp"
                android:layout_marginTop="8dp"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_three" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--3.土地投资和投融资-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp"
            android:visibility="visible">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_home_land_project"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@drawable/home_shape"
                android:padding="12dp"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@id/cl_home_investment"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/tv_temp_four"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingTop="4dp"
                    android:text="土地项目"
                    android:textColor="#222222"
                    android:textSize="14dp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:paddingBottom="4dp"
                    android:text="链上企业,交易有保障"
                    android:textColor="#999999"
                    android:textSize="10dp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/tv_temp_four" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/land_project"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_home_investment"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                android:background="@drawable/home_shape"
                android:padding="12dp"
                app:layout_constraintLeft_toRightOf="@id/cl_home_land_project"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/tv_temp_five"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:paddingTop="4dp"
                    android:text="投融资"
                    android:textColor="#222222"
                    android:textSize="14dp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:paddingBottom="4dp"
                    android:text="性价比高,服务便捷"
                    android:textColor="#999999"
                    android:textSize="10dp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/tv_temp_five" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/investment"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--4.快速发布和交易流程-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/cl_home_fast_release"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:background="@drawable/join_tender_shape"
                app:layout_constraintHorizontal_weight="2"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@id/cl_home_deal_process"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@mipmap/fast_release"
                    android:drawablePadding="5dp"
                    android:padding="10dp"
                    android:text="快速发布项目需求"
                    android:textColor="@color/white"
                    android:textSize="12dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:visibility="visible"
                android:id="@+id/cl_home_deal_process"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginLeft="8dp"
                android:background="@drawable/home_shape"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintHorizontal_weight="1"
                app:layout_constraintLeft_toRightOf="@id/cl_home_fast_release"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@mipmap/deal_process"
                    android:drawablePadding="5dp"
                    android:padding="10dp"
                    android:text="交易流程"
                    android:textColor="#FE7D01"
                    android:textSize="12dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--5.快捷入口-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp"
            android:background="@drawable/home_shape"
            android:visibility="visible"
            android:padding="12dp">

            <TextView
                android:id="@+id/tv_temp_six"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="快捷入口"
                android:textColor="#222222"
                android:textSize="14dp"
                android:textStyle="bold"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tv_home_fangxinbao"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:drawableTop="@mipmap/lanxinbao"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:text="兰信宝"
                android:textColor="#222222"
                android:textSize="12dp"
                app:layout_constraintHorizontal_weight="1"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toLeftOf="@+id/tv_home_fangmaiquan"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_six" />

            <TextView
                android:id="@+id/tv_home_fangmaiquan"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:drawableTop="@mipmap/fangmaiquan"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:text="房脉圈"
                android:textColor="#222222"
                android:textSize="12dp"
                app:layout_constraintHorizontal_weight="1"
                app:layout_constraintLeft_toRightOf="@+id/tv_home_fangxinbao"
                app:layout_constraintRight_toLeftOf="@+id/tv_home_fanglianyun"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_six" />

            <TextView
                android:id="@+id/tv_home_fanglianyun"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:drawableTop="@mipmap/fanglianyun"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:text="房链云"
                android:textColor="#222222"
                android:textSize="12dp"
                app:layout_constraintHorizontal_weight="1"
                app:layout_constraintLeft_toRightOf="@+id/tv_home_fangmaiquan"
                app:layout_constraintRight_toLeftOf="@id/tv_home_certificate_search"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_six" />

            <TextView
                android:id="@+id/tv_home_certificate_search"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:drawableTop="@mipmap/certificate_search"
                android:drawablePadding="5dp"
                android:gravity="center"
                android:text="证书查询"
                android:textColor="#222222"
                android:textSize="12dp"
                app:layout_constraintHorizontal_weight="1"
                app:layout_constraintLeft_toRightOf="@id/tv_home_fanglianyun"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_six" />

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--6.兰链智库-->
        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="12dp"
            android:layout_marginRight="12dp"
            android:background="@drawable/home_shape"
            android:padding="12dp">

            <TextView
                android:id="@+id/tv_temp_seven"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="兰链智库"
                android:textColor="#222222"
                android:textSize="14dp"
                app:layout_constraintLeft_toLeftOf="parent"
                android:textStyle="bold"
                app:layout_constraintRight_toLeftOf="@id/tv_home_blackstone_more"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/tv_home_blackstone_more"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:drawableRight="@mipmap/right_arrow_small"
                android:drawablePadding="2dp"
                android:padding="5dp"
                android:text="查看全部"
                android:textColor="#666666"
                android:textSize="10dp"
                app:layout_constraintBottom_toBottomOf="@id/tv_temp_seven"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tv_temp_seven" />

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="visible"
                app:layout_constraintTop_toBottomOf="@id/tv_temp_seven">

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/cl_hot_news"
                    android:layout_width="0dp"
                    android:layout_height="120dp"
                    android:layout_marginTop="12dp"
                    android:background="@mipmap/baishitong_left"
                    app:layout_constraintHorizontal_weight="1"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toLeftOf="@+id/tv_mine_enterprise_certificate"
                    app:layout_constraintTop_toTopOf="parent">

                    <TextView
                        android:id="@+id/tv_temp_eight"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:background="@drawable/baishitong_shape"
                        android:padding="3dp"
                        android:text="热点资讯"
                        android:textColor="@color/white"
                        android:textSize="10dp"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/tv_hot_info_title"
                        android:layout_width="120dp"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="8dp"
                        android:ellipsize="end"
                        android:lines="3"
                        android:text="房地产行业仍将对**经济发挥重要作用"
                        android:textColor="@color/white"
                        android:textSize="12dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintRight_toRightOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/_home_fast_info_detail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="10dp"
                        android:text="了解详情>>"
                        android:textColor="@color/white"
                        android:textSize="10dp"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent" />

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/tv_mine_enterprise_certificate"
                    android:layout_width="0dp"
                    android:layout_height="120dp"
                    android:layout_marginLeft="12dp"
                    app:layout_constraintBottom_toBottomOf="@id/cl_hot_news"
                    app:layout_constraintHorizontal_weight="1.3"
                    app:layout_constraintLeft_toRightOf="@+id/cl_hot_news"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="@id/cl_hot_news">

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/cl_building_standard"
                        android:layout_width="match_parent"
                        android:layout_height="56dp"
                        android:background="@drawable/home_housing_policy_shape"
                        android:padding="10dp"
                        app:layout_constraintTop_toTopOf="parent">

                        <TextView
                            android:id="@+id/tv_temp_nine"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="建筑规范"
                            android:textColor="#222222"
                            android:textSize="12dp"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <ImageView
                            android:id="@+id/iv_home_housing_policy"
                            android:layout_width="42dp"
                            android:layout_height="42dp"
                            android:src="@mipmap/baishitong_top"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintLeft_toRightOf="@id/tv_temp_ten" />

                        <TextView
                            android:id="@+id/tv_temp_ten"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="2dp"
                            android:layout_marginRight="5dp"
                            android:ellipsize="end"
                            android:lines="1"
                            android:text="最新国标建筑规范"
                            android:textSize="11dp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintLeft_toLeftOf="parent"
                            app:layout_constraintRight_toLeftOf="@id/iv_home_housing_policy"
                            app:layout_constraintTop_toBottomOf="@id/tv_temp_nine" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/cl_local_regulations"
                        android:layout_width="match_parent"
                        android:layout_height="56dp"
                        android:layout_marginTop="8dp"
                        android:background="@drawable/home_hot_topic_shape"
                        android:padding="10dp"
                        app:layout_constraintBottom_toBottomOf="parent">

                        <TextView
                            android:id="@+id/tv_temp_eleven"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="地方条例"
                            android:textColor="#222222"
                            android:textSize="12dp"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <TextView
                            android:id="@+id/tv_home_hot_topic_title"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="2dp"
                            android:layout_marginRight="5dp"
                            android:ellipsize="end"
                            android:lines="1"
                            android:text="各省市相关地方条例"
                            android:textSize="11dp"
                            app:layout_constraintLeft_toLeftOf="parent"
                            app:layout_constraintRight_toLeftOf="@id/iv_home_hot_topic"
                            app:layout_constraintTop_toBottomOf="@id/tv_temp_eleven" />

                        <ImageView
                            android:id="@+id/iv_home_hot_topic"
                            android:layout_width="42dp"
                            android:layout_height="42dp"
                            android:src="@mipmap/baishitong_bottom"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintLeft_toRightOf="@id/tv_temp_eleven" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </androidx.constraintlayout.widget.ConstraintLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <Space
            android:layout_width="match_parent"
            android:layout_height="8dp" />

        <!--7.底部轮播图-->
        <com.to.aboomy.banner.Banner
            android:id="@+id/banner_home_bottom"
            android:layout_width="match_parent"
            android:layout_height="90dp"
            android:layout_marginTop="8dp"
            app:layout_constraintTop_toTopOf="parent" />

        <Space
            android:layout_width="match_parent"
            android:layout_height="20dp" />

        <!--8.兰筑服务  土地项目   投融资-->
        <com.flyco.tablayout.SlidingTabLayout
            android:id="@+id/stl_home"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_isSticky="true"
            app:tl_indicator_color="@color/new_main"
            app:tl_indicator_height="3dp"
            app:tl_indicator_width="15dp"
            app:tl_textSelectColor="@color/common_text_color"
            app:tl_textUnselectColor="@color/color_666666"
            app:tl_textsize="16dp"
            tools:layout_editor_absoluteX="0dp" />

        <RelativeLayout
            android:id="@+id/rl_space"
            android:layout_width="match_parent"
            android:layout_height="12dp" />

        <com.donkingliang.consecutivescroller.ConsecutiveViewPager
            android:id="@+id/cvp_home"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </com.donkingliang.consecutivescroller.ConsecutiveScrollerLayout>

</com.scwang.smartrefresh.layout.SmartRefreshLayout>

<androidx.constraintlayout.widget.ConstraintLayout
    android:id="@+id/cl_home_login"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="11dp"
    android:layout_marginLeft="12dp"
    android:layout_marginRight="12dp"
    android:layout_marginBottom="11dp"
    android:alpha="0.8"
    android:background="@drawable/home_login_shape"
    android:paddingLeft="12dp"
    android:paddingTop="10dp"
    android:paddingRight="6dp"
    android:paddingBottom="10dp"
    app:layout_constraintBottom_toBottomOf="parent">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="登录开启兰房链数字地产"
        android:textColor="#ffffffff"
        android:textSize="14sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/tv_home_login"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/join_tender_shape"
        android:paddingLeft="16dp"
        android:paddingTop="5dp"
        android:paddingRight="16dp"
        android:paddingBottom="5dp"
        android:text="立即登录"
        android:textColor="#ffffffff"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

zguop commented

可以尝试重新 setPages(List<?> items, int startPosition)