From 3e4f923cedc17a0d56d045cb9afda8d6f903b988 Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 06 三月 2025 15:04:39 +0800
Subject: [PATCH] fix: 热力图矩阵

---
 app/src/main/res/layout/layout_year_stats.xml |  136 ++++++++++++++++++++++++---------------------
 1 files changed, 72 insertions(+), 64 deletions(-)

diff --git a/app/src/main/res/layout/layout_year_stats.xml b/app/src/main/res/layout/layout_year_stats.xml
index aa8a654..45e26af 100644
--- a/app/src/main/res/layout/layout_year_stats.xml
+++ b/app/src/main/res/layout/layout_year_stats.xml
@@ -1,76 +1,84 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:padding="16dp">
+    android:layout_marginHorizontal="16dp"
+    android:layout_marginTop="8dp"
+    android:layout_marginBottom="16dp">
 
-    <!-- 年度包裹总数 -->
     <LinearLayout
-        android:layout_width="0dp"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:gravity="center">
+        android:orientation="horizontal"
+        android:padding="16dp">
 
-        <TextView
-            android:id="@+id/text_total_packages"
-            android:layout_width="wrap_content"
+        <!-- 年度包裹总数 -->
+        <LinearLayout
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:textSize="24sp"
-            android:textStyle="bold"
-            android:textColor="@color/purple_500"
-            android:text="4"/>
+            android:layout_weight="1"
+            android:orientation="vertical"
+            android:gravity="center">
 
-        <TextView
-            android:layout_width="wrap_content"
+            <TextView
+                android:id="@+id/text_total_packages"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="24sp"
+                android:textStyle="bold"
+                android:textColor="@color/purple_500"
+                android:text="4"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp"
+                android:text="年度包裹总数"
+                android:textSize="12sp"/>
+
+            <ImageView
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:layout_marginTop="8dp"
+                android:src="@drawable/resource_package"/>
+        </LinearLayout>
+
+        <!-- 分隔线 -->
+        <View
+            android:layout_width="1dp"
+            android:layout_height="match_parent"
+            android:background="#E0E0E0"/>
+
+        <!-- 平均每天包裹数 -->
+        <LinearLayout
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginTop="4dp"
-            android:text="年度包裹总数"
-            android:textSize="12sp"/>
+            android:layout_weight="1"
+            android:orientation="vertical"
+            android:gravity="center">
 
-        <ImageView
-            android:layout_width="24dp"
-            android:layout_height="24dp"
-            android:layout_marginTop="8dp"
-            android:src="@drawable/resource_package"/>
+            <TextView
+                android:id="@+id/text_daily_average"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="24sp"
+                android:textStyle="bold"
+                android:textColor="@color/purple_500"
+                android:text="0.29"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp"
+                android:text="平均每天包裹数"
+                android:textSize="12sp"/>
+
+            <ImageView
+                android:layout_width="24dp"
+                android:layout_height="24dp"
+                android:layout_marginTop="8dp"
+                android:src="@drawable/avg_package"/>
+        </LinearLayout>
+
     </LinearLayout>
-
-    <!-- 分隔线 -->
-    <View
-        android:layout_width="1dp"
-        android:layout_height="match_parent"
-        android:background="#E0E0E0"/>
-
-    <!-- 平均每天包裹数 -->
-    <LinearLayout
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:gravity="center">
-
-        <TextView
-            android:id="@+id/text_daily_average"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textSize="24sp"
-            android:textStyle="bold"
-            android:textColor="@color/purple_500"
-            android:text="0.29"/>
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="4dp"
-            android:text="平均每天包裹数"
-            android:textSize="12sp"/>
-
-        <ImageView
-            android:layout_width="24dp"
-            android:layout_height="24dp"
-            android:layout_marginTop="8dp"
-            android:src="@drawable/avg_package"/>
-    </LinearLayout>
-
-</LinearLayout> 
\ No newline at end of file
+</androidx.cardview.widget.CardView> 
\ No newline at end of file

--
Gitblit v1.9.3