<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="15dp"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            android:paddingTop="8dp"
            android:paddingBottom="8dp">

            <com.google.android.material.tabs.TabLayout
                android:id="@+id/tabLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:tabBackground="@android:color/transparent"
                app:tabGravity="start"
                app:tabIndicatorHeight="0dp"
                app:tabInlineLabel="true"
                app:tabMinWidth="0dp"
                app:tabMode="scrollable"
                app:tabPaddingEnd="20dp"
                app:tabRippleColor="@android:color/transparent"
                app:tabSelectedTextColor="@color/black"
                app:tabTextAppearance="@style/MyTabTextAppearance"
                app:tabTextColor="#A0A0A0" />

        </RelativeLayout>

        <androidx.viewpager2.widget.ViewPager2
            android:id="@+id/viewPager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </LinearLayout>

    <!-- 悬浮按钮容器 -->
    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="80dp"
        android:orientation="vertical"
        android:gravity="center">

        <ImageView
            android:id="@+id/btn_scroll_to_top"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:padding="5dp"
            android:layout_marginBottom="8dp"
            android:background="@drawable/bg_icon"
            android:src="@drawable/ic_top"
            android:visibility="gone"
            android:clickable="true"
            android:focusable="true" />

        <ImageView
            android:id="@+id/btn_refresh"
            android:layout_width="45dp"
            android:layout_height="45dp"
            android:padding="8dp"
            android:background="@drawable/bg_icon"
            android:src="@drawable/ic_refreshit"
            android:clickable="true"
            android:focusable="true" />

    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>