From 4ceacd9e21e09989287e8dc4e526d182091af282 Mon Sep 17 00:00:00 2001
From: zuoxiao <lf_zuo@163.com>
Date: 星期四, 26 六月 2025 13:39:52 +0800
Subject: [PATCH] feat(nfc): 优化 NFC卡片处理流程

---
 generallibrary/src/main/res/layout/activity_manager_read.xml |  107 ++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 69 insertions(+), 38 deletions(-)

diff --git a/generallibrary/src/main/res/layout/activity_manager_read.xml b/generallibrary/src/main/res/layout/activity_manager_read.xml
index 20ba03c..3bb6c28 100644
--- a/generallibrary/src/main/res/layout/activity_manager_read.xml
+++ b/generallibrary/src/main/res/layout/activity_manager_read.xml
@@ -156,78 +156,109 @@
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:orientation="vertical"
-                android:padding="16dp">
+                android:orientation="vertical">
 
-                <LinearLayout
-                    android:id="@+id/card_read_LL"
+                <androidx.cardview.widget.CardView
+                    android:id="@+id/nfcContainer"
                     android:layout_width="match_parent"
                     android:layout_height="match_parent"
-                    android:gravity="center"
-                    android:orientation="vertical">
+                    android:layout_marginStart="16dp"
+                    android:layout_marginTop="24dp"
+                    android:layout_marginEnd="16dp"
+                    android:layout_marginBottom="24dp"
+                    android:visibility="visible"
+                    app:cardBackgroundColor="@android:color/white"
+                    app:cardCornerRadius="12dp"
+                    app:cardElevation="4dp"
+                    app:layout_constraintBottom_toBottomOf="parent"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toStartOf="parent"
+                    app:layout_constraintTop_toBottomOf="@id/titleBar">
 
-                    <androidx.cardview.widget.CardView
+                    <FrameLayout
                         android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_marginBottom="16dp"
-                        app:cardCornerRadius="8dp"
-                        app:cardElevation="2dp">
+                        android:layout_height="match_parent">
 
-                        <RelativeLayout
+                        <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="match_parent"
+                            android:gravity="center"
+                            android:orientation="vertical"
                             android:padding="16dp">
 
                             <TextView
-                                android:id="@+id/tv_title"
+                                android:id="@+id/textView"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_marginBottom="100dp"
                                 android:gravity="center"
-                                android:text="鍒朵綔绠$悊鍗�"
-                                android:layout_marginTop="20dp"
-                                android:textColor="@color/base_blue_bg"
-                                android:textSize="@dimen/big_text_size"
+                                android:text="璇峰皢鏂板崱璐村湪璁惧涓婅繘琛岃鍗�"
+                                android:textColor="#333333"
+                                android:textSize="18sp"
                                 android:textStyle="bold" />
 
                             <TextView
-                                android:id="@+id/tv_subtitle"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_below="@+id/tv_title"
-                                android:layout_marginBottom="20dp"
+                                android:layout_marginTop="20dp"
                                 android:gravity="center"
-                                android:text="璇峰皢鏂板崱璐村湪璁惧涓婅繘琛岃鍙�"
-                                android:textColor="#333333"
-                                android:textSize="@dimen/text_size"
+                                android:text="灏嗚繘琛屽垵濮嬪寲鍗$墖\n鑰楁椂杈冮暱璇蜂笉瑕佺Щ鍔ㄥ崱鐗�"
+                                android:textColor="@color/base_blue_bg"
+                                android:textSize="18sp"
                                 android:textStyle="bold" />
 
                             <ImageView
-                                android:id="@+id/iv_nfc"
-                                android:layout_width="120dp"
-                                android:layout_height="120dp"
-                                android:layout_below="@+id/tv_subtitle"
-                                android:layout_centerHorizontal="true"
-                                android:layout_marginBottom="20dp"
+                                android:id="@+id/nfcImageView"
+                                android:layout_width="200dp"
+                                android:layout_height="200dp"
+                                android:layout_marginTop="24dp"
                                 android:scaleType="fitCenter"
                                 android:src="@mipmap/nfc_write" />
 
                             <TextView
-                                android:id="@+id/tv_tip"
                                 android:layout_width="match_parent"
                                 android:layout_height="wrap_content"
-                                android:layout_below="@+id/iv_nfc"
+                                android:layout_marginTop="16dp"
                                 android:gravity="center"
-                                android:text="璇诲彇鏂板崱鍚庡皢鏄剧ず鍘熷崱淇℃伅杩涜鍒朵綔绠$悊鍗�"
+                                android:text="璇蜂繚鎸佹墜鎸佹満鍜屽崱鐗囦笉瑕佺Щ鍔�"
                                 android:textColor="#666666"
-                                android:textSize="@dimen/new_card_size" />
+                                android:textSize="14sp" />
+                        </LinearLayout>
 
+                        <RelativeLayout
+                            android:id="@+id/loadingContainer"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="#80000000"
+                            android:visibility="gone">
+
+                            <com.pnikosis.materialishprogress.ProgressWheel
+                                android:id="@+id/nfcProgressWheel"
+                                android:layout_width="100dp"
+                                android:layout_height="100dp"
+                                android:layout_centerInParent="true"
+                                app:matProg_barColor="@color/base_blue_bg"
+                                app:matProg_barWidth="8dp"
+                                app:matProg_progressIndeterminate="true"
+                                app:matProg_rimColor="#33000000"
+                                app:matProg_rimWidth="8dp"
+                                app:matProg_spinSpeed="0.5" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_below="@id/nfcProgressWheel"
+                                android:layout_centerHorizontal="true"
+                                android:layout_marginTop="12dp"
+                                android:text="姝e湪澶勭悊NFC鍗$墖..."
+                                android:textColor="#FFFFFF"
+                                android:textSize="16sp" />
                         </RelativeLayout>
-                    </androidx.cardview.widget.CardView>
-                </LinearLayout>
+                    </FrameLayout>
+                </androidx.cardview.widget.CardView>
 
             </LinearLayout>
         </ScrollView>
+
         <TextView
             android:id="@+id/btn_next"
             android:layout_width="match_parent"
@@ -238,10 +269,10 @@
             android:layout_marginBottom="16dp"
             android:background="#4285F4"
             android:gravity="center"
-            android:visibility="gone"
             android:text="涓嬩竴姝�"
             android:textColor="#FFFFFF"
-            android:textSize="16sp" />
+            android:textSize="16sp"
+            android:visibility="gone" />
 
     </RelativeLayout>
 </layout>
\ No newline at end of file

--
Gitblit v1.8.0