From d0a0e8e242e293ad35dfbee1217f1103302818cd Mon Sep 17 00:00:00 2001
From: zuojincheng <lf_zuo@163.com>
Date: 星期四, 03 四月 2025 10:22:48 +0800
Subject: [PATCH] refactor(generallibrary):重构卡片和用户搜索功能

---
 generallibrary/src/main/res/layout/item_user_list.xml |  104 +++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 95 insertions(+), 9 deletions(-)

diff --git a/generallibrary/src/main/res/layout/item_user_list.xml b/generallibrary/src/main/res/layout/item_user_list.xml
index e93821a..1fa1abb 100644
--- a/generallibrary/src/main/res/layout/item_user_list.xml
+++ b/generallibrary/src/main/res/layout/item_user_list.xml
@@ -1,13 +1,99 @@
 <?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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:padding="12dp">
+    android:layout_marginBottom="8dp"
+    app:cardCornerRadius="8dp"
+    app:cardElevation="2dp">
 
-    <TextView android:id="@+id/tvCardCount" android:layout_width="match_parent" android:layout_height="wrap_content" />
-    <TextView android:id="@+id/tvFarmerId" android:layout_width="match_parent" android:layout_height="wrap_content" />
-    <TextView android:id="@+id/tvIdCard" android:layout_width="match_parent" android:layout_height="wrap_content" />
-    <TextView android:id="@+id/tvName" android:layout_width="match_parent" android:layout_height="wrap_content" />
-    <TextView android:id="@+id/tvPhone" android:layout_width="match_parent" android:layout_height="wrap_content" />
-</LinearLayout>
\ No newline at end of file
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:padding="16dp">
+
+        <TextView
+            android:id="@+id/tvName"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="18sp"
+            android:textStyle="bold"
+            android:textColor="#333333"
+            android:layout_marginBottom="8dp"/>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+            
+            <TextView
+                android:id="@+id/tvFarmerId"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:layout_height="wrap_content"
+                android:textSize="14sp"
+                android:textColor="#666666"
+                android:layout_marginBottom="4dp"/>
+                
+            <TextView
+                android:id="@+id/tvCardCount"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="14sp"
+                android:textColor="#4CAF50"
+                android:layout_marginBottom="4dp"/>
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/tvIdCard"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="14sp"
+            android:textColor="#666666"
+            android:layout_marginBottom="4dp"/>
+
+        <TextView
+            android:id="@+id/tvPhone"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="14sp"
+            android:textColor="#666666"
+            android:layout_marginBottom="4dp"/>
+
+        <LinearLayout
+            android:id="@+id/llAddress"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:layout_marginBottom="4dp"
+            android:visibility="gone">
+
+            <TextView
+                android:id="@+id/tvAddressLabel"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="鍦板潃锛�"
+                android:textSize="14sp"
+                android:textColor="#666666"/>
+
+            <TextView
+                android:id="@+id/tvAddressValue"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:layout_height="wrap_content"
+                android:textSize="14sp"
+                android:textColor="#666666"/>
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/tvOperateDate"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="12sp"
+            android:textColor="#999999"
+            android:layout_marginTop="4dp"
+            android:visibility="gone"/>
+    </LinearLayout>
+</androidx.cardview.widget.CardView>
\ No newline at end of file

--
Gitblit v1.8.0