<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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">

    <!-- AppBarLayout必须作为CoordinatorLayout的直接子View，否则它的大部分功能将不会生效，如layout_scrollFlags等。   -->
    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:orientation="vertical">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="16dp"
            app:layout_scrollFlags="scroll|enterAlwaysCollapsed"
            tools:ignore="ContentDescription">

            <ImageView
                android:id="@+id/tv_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:src="@mipmap/tille"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="HardcodedText" />

            <LinearLayout
                android:id="@+id/ll_weather"
                android:layout_width="90dp"
                android:layout_height="36dp"
                android:layout_marginEnd="16dp"
                android:background="@drawable/bg_e7eef6_18"
                app:layout_constraintBottom_toBottomOf="@id/tv_name"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="@id/tv_name">

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="12dp">

                    <TextView
                        android:id="@+id/tv_wendu"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:text="30"
                        android:textColor="@color/black"
                        android:textSize="19sp"
                        tools:ignore="HardcodedText" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="3dp"
                        android:text="℃"
                        android:textColor="@color/black"
                        android:textSize="14sp"
                        tools:ignore="HardcodedText" />
                </LinearLayout>

                <ImageView
                    android:id="@+id/iv_weather"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_marginStart="2dp"
                    android:src="@mipmap/duoyun" />

            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/searchLayout"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_marginHorizontal="15dp"
            android:background="@drawable/bg_stroke_070709"
            android:gravity="center"
            android:orientation="horizontal">


            <androidx.constraintlayout.widget.ConstraintLayout
                android:id="@+id/fl_search_engine"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:background="?android:attr/selectableItemBackground"
                android:padding="5dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="ContentDescription">

                <ImageView
                    android:id="@+id/iv_search_engine"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/h_s_google"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="-2dp"
                    android:layout_marginBottom="-2dp"
                    android:src="@mipmap/xuanze"
                    app:layout_constraintBottom_toBottomOf="@id/fl_search_engine"
                    app:layout_constraintEnd_toEndOf="@id/fl_search_engine"
                    tools:ignore="ContentDescription" />

            </androidx.constraintlayout.widget.ConstraintLayout>


            <TextView
                android:id="@+id/edit_web"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginHorizontal="5dp"
                android:background="@null"
                android:gravity="center_vertical"
                android:hint="Search or enter website address"
                android:imeOptions="actionDone"
                android:inputType="textUri"
                android:paddingHorizontal="5dp"
                android:singleLine="true"
                android:textColorHint="#858587"
                android:textSize="14sp"
                app:layout_constraintEnd_toStartOf="@id/fl_scan"
                app:layout_constraintStart_toEndOf="@id/fl_search_engine"
                tools:ignore="Autofill,HardcodedText,TextFields" />

            <FrameLayout
                android:id="@+id/fl_scan"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:background="?android:attr/selectableItemBackground"
                android:padding="5dp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:ignore="ContentDescription">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@mipmap/saoyisao" />

            </FrameLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

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


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:orientation="vertical"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">


        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />


    </LinearLayout>


    <ImageView
        android:id="@+id/iv_up"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_marginEnd="8dp"
        android:layout_marginBottom="50dp"
        android:src="@mipmap/huidingbu"
        android:visibility="gone"
        tools:ignore="ContentDescription" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>