From 14b15539a8fbbce1145197993e0c062400174ef1 Mon Sep 17 00:00:00 2001
From: zuoxiao <lf_zuo@163.com>
Date: 星期四, 26 六月 2025 16:51:12 +0800
Subject: [PATCH] docs(baselibrary): 更新 NativeNfcReadHelper 类文档
---
generallibrary/src/main/res/layout/activity_manager_read.xml | 238 ++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 195 insertions(+), 43 deletions(-)
diff --git a/generallibrary/src/main/res/layout/activity_manager_read.xml b/generallibrary/src/main/res/layout/activity_manager_read.xml
index 19ef124..3bb6c28 100644
--- a/generallibrary/src/main/res/layout/activity_manager_read.xml
+++ b/generallibrary/src/main/res/layout/activity_manager_read.xml
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- xmlns:app="http://schemas.android.com/apk/res-auto">
-
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
+
<data>
+
<variable
name="viewModel"
type="com.dayu.general.model.CardInfoModel" />
@@ -20,19 +21,22 @@
android:background="@color/title_bar_bg"
android:elevation="4dp"
app:centerText="鍒朵綔绠$悊鍗�"
+ app:leftImage="@mipmap/icon_back"
tools:ignore="MissingConstraints" />
<LinearLayout
android:id="@+id/data_layout"
android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_below="@+id/titleBar"
android:orientation="vertical"
- android:layout_height="wrap_content">
+ android:visibility="gone">
+
<LinearLayout
android:layout_width="match_parent"
- android:orientation="vertical"
- android:layout_height="wrap_content">
-
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -44,15 +48,71 @@
android:layout_height="wrap_content"
android:text="鍗″彿锛�"
android:textColor="#333333"
- android:textSize="16sp"/>
+ android:textSize="16sp" />
<TextView
android:id="@+id/card_number_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:text="@{viewModel.cardNumber}"
android:textColor="#333333"
- android:textSize="16sp"
- android:text="@{viewModel.cardNumber}"/>
+ android:textSize="16sp" />
+ </LinearLayout>
+
+ <!-- 鍖哄煙鍙疯緭鍏ユ - 浠呭湪鍖哄煙琛ㄥ彿鍗℃椂鏄剧ず -->
+ <LinearLayout
+ android:id="@+id/region_number_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:visibility="gone">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="鍖哄煙鍙凤細"
+ android:textColor="#333333"
+ android:textSize="16sp" />
+
+ <EditText
+ android:id="@+id/region_number_et"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@null"
+ android:hint="璇疯緭鍏�12浣嶆暟瀛楀尯鍩熷彿"
+ android:inputType="number"
+ android:maxLength="12"
+ android:text="@={viewModel.regionNumber}"
+ android:textSize="16sp" />
+ </LinearLayout>
+
+ <!-- 椤圭洰鍙疯緭鍏ユ - 浠呭湪鍖哄煙琛ㄥ彿鍗℃椂鏄剧ず -->
+ <LinearLayout
+ android:id="@+id/project_number_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:padding="16dp"
+ android:visibility="gone">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="椤圭洰鍙凤細"
+ android:textColor="#333333"
+ android:textSize="16sp" />
+
+ <EditText
+ android:id="@+id/project_number_et"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@null"
+ android:hint="璇疯緭鍏ラ」鐩彿(1-255)"
+ android:inputType="number"
+ android:maxLength="3"
+ android:text="@={viewModel.projectNumber}"
+ android:textSize="16sp" />
</LinearLayout>
<LinearLayout
@@ -66,7 +126,7 @@
android:layout_height="wrap_content"
android:text="澶囨敞锛�"
android:textColor="#333333"
- android:textSize="16sp"/>
+ android:textSize="16sp" />
<EditText
android:id="@+id/remark_et"
@@ -74,53 +134,145 @@
android:layout_height="wrap_content"
android:background="@null"
android:hint="璇疯緭鍏ュ娉ㄤ俊鎭�"
- android:textSize="16sp"
- android:text="@={viewModel.remark}"/>
+
+ android:text="@={viewModel.remark}"
+ android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
- <LinearLayout
- android:id="@+id/recharge_read_LL"
+
+ <!-- 璇诲崱鎻愮ず鍖哄煙 - 鍏ㄥ睆鏄剧ず -->
+ <ScrollView
+ android:id="@+id/scroll_read_card"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_below="@+id/data_layout"
- android:orientation="vertical"
+ android:layout_below="@+id/titleBar"
+ android:fillViewport="true"
android:visibility="visible">
- <androidx.cardview.widget.CardView
+ <LinearLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_margin="16dp"
- app:cardCornerRadius="8dp"
- app:cardElevation="2dp">
+ android:layout_height="match_parent"
+ android:orientation="vertical">
- <LinearLayout
+ <androidx.cardview.widget.CardView
+ android:id="@+id/nfcContainer"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:padding="16dp">
+ android:layout_height="match_parent"
+ 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">
- <TextView
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
- android:gravity="center"
- android:text="璇峰皢鍗¤创鍦ㄨ澶囦笂杩涜璇诲崱"
- android:textColor="#333333"
- android:textSize="@dimen/text_size"
- android:textStyle="bold" />
+ android:layout_height="match_parent">
- <ImageView
- android:layout_width="200dp"
- android:layout_height="200dp"
- android:layout_gravity="center"
- android:scaleType="fitCenter"
- android:src="@mipmap/nfc_write" />
- </LinearLayout>
- </androidx.cardview.widget.CardView>
- </LinearLayout>
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <TextView
+ android:id="@+id/textView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:text="璇峰皢鏂板崱璐村湪璁惧涓婅繘琛岃鍗�"
+ android:textColor="#333333"
+ android:textSize="18sp"
+ android:textStyle="bold" />
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="20dp"
+ android:gravity="center"
+ android:text="灏嗚繘琛屽垵濮嬪寲鍗$墖\n鑰楁椂杈冮暱璇蜂笉瑕佺Щ鍔ㄥ崱鐗�"
+ android:textColor="@color/base_blue_bg"
+ android:textSize="18sp"
+ android:textStyle="bold" />
+
+ <ImageView
+ 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:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="16dp"
+ android:gravity="center"
+ android:text="璇蜂繚鎸佹墜鎸佹満鍜屽崱鐗囦笉瑕佺Щ鍔�"
+ android:textColor="#666666"
+ 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>
+ </FrameLayout>
+ </androidx.cardview.widget.CardView>
+
+ </LinearLayout>
+ </ScrollView>
+
+ <TextView
+ android:id="@+id/btn_next"
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ android:layout_alignParentBottom="true"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ android:layout_marginBottom="16dp"
+ android:background="#4285F4"
+ android:gravity="center"
+ android:text="涓嬩竴姝�"
+ android:textColor="#FFFFFF"
+ android:textSize="16sp"
+ android:visibility="gone" />
+
</RelativeLayout>
</layout>
\ No newline at end of file
--
Gitblit v1.8.0