cloudroam
2025-03-06 cf9bc941487df8dfb0780d3e8f1281f4e397b5fa
app/src/main/res/layout/fragment_dashboard.xml
@@ -81,7 +81,8 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="16dp">
            android:padding="16dp"
            android:gravity="center_vertical">
            <ImageView
                android:layout_width="48dp"
@@ -92,36 +93,52 @@
                android:id="@+id/text_package_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginStart="16dp"
                android:textSize="24sp"
                android:textStyle="bold"
                tools:text="4个" />
        </LinearLayout>
    </androidx.cardview.widget.CardView>
    <!-- 包裹列表 -->
    <ViewFlipper
        android:id="@+id/view_flipper_stats"
    <!-- 年度统计布局 -->
    <include
        android:id="@+id/layout_year_stats"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toBottomOf="@id/card_package_stats">
        android:visibility="gone"
        app:layout_constraintTop_toBottomOf="@id/card_package_stats"
        layout="@layout/layout_year_stats" />
        <!-- 日视图 -->
        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/recycler_packages"
    <!-- 包裹列表和统计图表 -->
    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:fillViewport="true"
        app:layout_constraintTop_toBottomOf="@id/layout_year_stats"
        app:layout_constraintBottom_toBottomOf="parent">
        <ViewFlipper
            android:id="@+id/view_flipper_stats"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
            android:layout_height="wrap_content">
        <!-- 周视图 -->
        <include
            android:id="@+id/layout_week_stats"
            layout="@layout/layout_week_stats"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
            <!-- 日视图 -->
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_packages"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:clipToPadding="false"
                android:paddingBottom="16dp" />
        <!-- 月视图和年视图可以根据需要添加 -->
            <!-- 周视图 -->
            <include
                android:id="@+id/layout_week_stats"
                layout="@layout/layout_week_stats"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />
    </ViewFlipper>
        </ViewFlipper>
    </androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>