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

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/ui_background"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/appbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/ui_background"
            android:fitsSystemWindows="true"
            app:elevation="0dp"
            app:layout_behavior="com.gh.gamecenter.common.view.FixAppBarLayoutBehavior">

            <com.gh.gamecenter.common.view.ScrimAwareCollapsingToolbarLayout
                android:id="@+id/collapsingToolbar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true"
                app:contentScrim="@color/ui_background"
                app:layout_scrollFlags="scroll|exitUntilCollapsed"
                app:scrimAnimationDuration="200">

                <ImageView
                    android:id="@+id/headIv"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    app:layout_collapseMode="parallax"
                    app:layout_collapseParallaxMultiplier="1"
                    app:srcCompat="@drawable/help_head" />

                <androidx.appcompat.widget.Toolbar
                    android:id="@+id/toolbar"
                    style="@style/Base_ToolbarStyle"
                    android:layout_width="match_parent"
                    android:layout_height="96dp"
                    android:background="@color/transparent"
                    app:layout_collapseMode="pin" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    app:layout_collapseMode="pin">

                    <com.gh.gamecenter.common.view.StatusBarView
                        android:id="@+id/statusBar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:background="@color/transparent" />

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:layout_width="match_parent"
                        android:layout_height="@dimen/appbar_height"
                        android:layout_marginStart="50dp"
                        android:layout_marginLeft="50dp">

                        <TextView
                            android:id="@+id/titleTv"
                            android:layout_width="0dp"
                            android:layout_height="@dimen/appbar_height"
                            android:gravity="center"
                            android:singleLine="true"
                            android:text="帮助与反馈"
                            android:textColor="@color/text_black"
                            android:textSize="15sp"
                            android:textStyle="bold"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toStartOf="@+id/actionMenuView"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <androidx.appcompat.widget.ActionMenuView
                            android:id="@+id/actionMenuView"
                            android:layout_width="wrap_content"
                            android:layout_height="match_parent"
                            android:minWidth="44dp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                    </androidx.constraintlayout.widget.ConstraintLayout>
                </LinearLayout>

                <LinearLayout
                    android:id="@+id/searchLl"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:orientation="vertical"
                    android:paddingBottom="32dp">

                    <androidx.constraintlayout.widget.ConstraintLayout
                        android:id="@+id/searchContainer"
                        android:layout_width="match_parent"
                        android:layout_height="32dp"
                        android:layout_marginStart="16dp"
                        android:layout_marginEnd="16dp"
                        android:background="@drawable/background_shape_white_radius_999">

                        <ImageView
                            android:id="@+id/searchIv"
                            android:layout_width="14dp"
                            android:layout_height="14dp"
                            android:layout_marginStart="12dp"
                            android:layout_marginLeft="12dp"
                            app:layout_constraintBottom_toBottomOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent"
                            app:srcCompat="@drawable/toolbar_search_icon" />

                        <TextView
                            android:id="@+id/searchTv"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="8dp"
                            android:layout_marginLeft="8dp"
                            android:ellipsize="end"
                            android:hint="输入问题关键词"
                            android:includeFontPadding="false"
                            android:textColor="@color/text_instance"
                            android:textColorHint="@color/text_instance"
                            app:layout_constraintBottom_toBottomOf="@+id/searchIv"
                            app:layout_constraintStart_toEndOf="@+id/searchIv"
                            app:layout_constraintTop_toTopOf="@+id/searchIv" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </LinearLayout>

            </com.gh.gamecenter.common.view.ScrimAwareCollapsingToolbarLayout>
        </com.google.android.material.appbar.AppBarLayout>

        <androidx.core.widget.NestedScrollView
            android:id="@+id/nestedScrollView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:overScrollMode="never"
            app:behavior_overlapTop="16dp"
            app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:orientation="vertical">

                <androidx.cardview.widget.CardView
                    android:id="@+id/helpVideoCv"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:cardBackgroundColor="@color/ui_surface"
                    app:cardCornerRadius="8dp"
                    app:cardElevation="0dp">

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

                        <TextView
                            android:id="@+id/helpVideoTv"
                            android:layout_width="wrap_content"
                            android:layout_height="48dp"
                            android:layout_marginStart="16dp"
                            android:layout_marginLeft="16dp"
                            android:gravity="center"
                            android:text="帮助视频"
                            android:textColor="@color/text_primary"
                            android:textSize="@dimen/primary_title_text_size"
                            android:textStyle="bold"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <com.gh.gamecenter.common.view.ScaleIndicatorView
                            android:id="@+id/helpVideoIndicator"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginEnd="16dp"
                            android:layout_marginRight="16dp"
                            app:checkedColor="@color/primary_theme"
                            app:checkedSliderWidth="12dp"
                            app:layout_constraintBottom_toBottomOf="@+id/helpVideoTv"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintTop_toTopOf="parent"
                            app:normalColor="@color/ui_divider"
                            app:normalSliderWidth="4dp"
                            app:sliderGap="4dp"
                            app:sliderHeight="4dp" />

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/helpVideoRv"
                            android:layout_width="0dp"
                            android:layout_height="199dp"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/helpVideoTv" />

                        <include
                            android:id="@+id/helpVideoLoading"
                            layout="@layout/reuse_loading"
                            android:layout_width="0dp"
                            android:layout_height="199dp"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/helpVideoTv" />

                    </androidx.constraintlayout.widget.ConstraintLayout>

                </androidx.cardview.widget.CardView>

                <androidx.cardview.widget.CardView
                    android:id="@+id/helpCenterCv"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp"
                    android:layout_marginBottom="16dp"
                    app:cardBackgroundColor="@color/ui_surface"
                    app:cardCornerRadius="8dp"
                    app:cardElevation="0dp">

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

                        <TextView
                            android:id="@+id/helpCenterTv"
                            android:layout_width="0dp"
                            android:layout_height="48dp"
                            android:gravity="center_vertical"
                            android:paddingStart="16dp"
                            android:paddingLeft="16dp"
                            android:text="帮助中心"
                            android:textColor="@color/text_primary"
                            android:textSize="@dimen/primary_title_text_size"
                            android:textStyle="bold"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toTopOf="parent" />

                        <androidx.constraintlayout.widget.ConstraintLayout
                            android:id="@+id/categoryContainer"
                            android:layout_width="match_parent"
                            android:layout_height="40dp"
                            app:layout_constraintTop_toBottomOf="@+id/helpCenterTv">

                            <androidx.recyclerview.widget.RecyclerView
                                android:id="@+id/categoryRv"
                                android:layout_width="0dp"
                                android:layout_height="28dp"
                                android:overScrollMode="never"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toStartOf="@+id/categoryMoreBackground"
                                app:layout_constraintStart_toStartOf="parent"
                                app:layout_constraintTop_toTopOf="parent"
                                app:layout_goneMarginEnd="0dp" />

                            <View
                                android:id="@+id/categoryMoreBackground"
                                android:layout_width="48dp"
                                android:layout_height="40dp"
                                android:visibility="gone"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintTop_toTopOf="parent" />

                            <ImageView
                                android:id="@+id/categoryMoreIv"
                                android:layout_width="16dp"
                                android:layout_height="16dp"
                                android:visibility="gone"
                                app:layout_constraintBottom_toBottomOf="parent"
                                app:layout_constraintEnd_toEndOf="parent"
                                app:layout_constraintStart_toStartOf="@+id/categoryMoreBackground"
                                app:layout_constraintTop_toTopOf="parent"
                                app:srcCompat="@drawable/icon_menu" />
                        </androidx.constraintlayout.widget.ConstraintLayout>

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/helpContentRv"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:overScrollMode="never"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/categoryContainer" />

                        <include
                            android:id="@+id/helpContentLoading"
                            layout="@layout/reuse_loading"
                            android:layout_width="0dp"
                            android:layout_height="540dp"
                            app:layout_constraintEnd_toEndOf="@+id/helpContentRv"
                            app:layout_constraintStart_toStartOf="@+id/helpContentRv"
                            app:layout_constraintTop_toTopOf="@+id/helpContentRv" />

                        <include
                            android:id="@+id/helpContentNoneData"
                            layout="@layout/reuse_none_data"
                            android:layout_width="0dp"
                            android:layout_height="540dp"
                            android:visibility="gone"
                            app:layout_constraintEnd_toEndOf="@+id/helpContentRv"
                            app:layout_constraintStart_toStartOf="@+id/helpContentRv"
                            app:layout_constraintTop_toTopOf="@+id/helpContentRv" />

                        <include
                            android:id="@+id/helpContentNoConnection"
                            layout="@layout/reuse_no_connection"
                            android:layout_width="0dp"
                            android:layout_height="540dp"
                            android:visibility="gone"
                            app:layout_constraintEnd_toEndOf="@+id/helpContentRv"
                            app:layout_constraintStart_toStartOf="@+id/helpContentRv"
                            app:layout_constraintTop_toTopOf="@+id/helpContentRv" />

                        <View
                            android:id="@+id/helpContentDivider"
                            android:layout_width="0dp"
                            android:layout_height="0.5dp"
                            android:background="@color/ui_divider"
                            android:visibility="gone"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/helpContentRv"
                            tools:visibility="visible" />

                        <TextView
                            android:id="@+id/helpContentMoreTv"
                            android:layout_width="wrap_content"
                            android:layout_height="48dp"
                            android:drawablePadding="4dp"
                            android:gravity="center"
                            android:text="查看更多"
                            android:textColor="@color/text_tertiary"
                            android:textSize="@dimen/secondary_size"
                            android:visibility="gone"
                            app:drawableEndCompat="@drawable/ic_item_jump"
                            app:drawableTint="@color/text_tertiary"
                            app:layout_constraintEnd_toEndOf="parent"
                            app:layout_constraintStart_toStartOf="parent"
                            app:layout_constraintTop_toBottomOf="@+id/helpContentDivider"
                            tools:visibility="visible" />

                    </androidx.constraintlayout.widget.ConstraintLayout>
                </androidx.cardview.widget.CardView>
            </LinearLayout>
        </androidx.core.widget.NestedScrollView>
    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.swiperefreshlayout.widget.ViewPagerSwipeRefreshLayout>