From 55b196ea2e28a8d859c85326f2147a4f7b7196de Mon Sep 17 00:00:00 2001
From: zuojincheng <lf_zuo@163.com>
Date: 星期四, 10 四月 2025 10:58:32 +0800
Subject: [PATCH] feat(general): 新增开卡信息保存功能并优化界面布局- 新增 CardRegistrationBean 数据模型用于保存开卡信息 - 在数据库中添加 card_registration 表用于存储开卡记录 - 优化 NewCard2Activity 界面布局,调整样式和间距 - 添加协程支持,实现异步保存开卡信息到数据库 - 更新颜色配置,统一使用新加的 base_blue_bg 和 base_green_bg颜色
---
generallibrary/src/main/res/layout/activity_new_card_1_ge.xml | 73 ++++++++++++++++++------------------
1 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/generallibrary/src/main/res/layout/activity_new_card_1_ge.xml b/generallibrary/src/main/res/layout/activity_new_card_1_ge.xml
index 0fdbd92..adba47f 100644
--- a/generallibrary/src/main/res/layout/activity_new_card_1_ge.xml
+++ b/generallibrary/src/main/res/layout/activity_new_card_1_ge.xml
@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="#F5F7FA">
+ android:background="@color/base_list_bg">
<com.dayu.baselibrary.view.TitleBar
android:id="@+id/titleBar"
@@ -79,24 +79,28 @@
</androidx.cardview.widget.CardView>
<ScrollView
+ android:id="@+id/center_scroll"
android:layout_width="match_parent"
android:layout_height="0dp"
android:fillViewport="true"
android:scrollbars="none"
- android:visibility="gone"
- app:layout_constraintBottom_toTopOf="@+id/newCard_registBtn"
+ android:visibility="visible"
+ app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titleBar">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:padding="16dp">
+ android:paddingBottom="16dp"
+ android:paddingLeft="16dp"
+ android:paddingRight="16dp"
+ android:paddingTop="10dp">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
+ android:layout_marginBottom="10dp"
app:cardCornerRadius="8dp"
app:cardElevation="2dp">
@@ -110,7 +114,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
+ android:layout_marginBottom="10dp"
android:text="鍩烘湰淇℃伅"
android:textColor="#333333"
android:textSize="18sp"
@@ -119,12 +123,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="6dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="鍗″彿锛�"
android:textColor="#666666"
@@ -142,12 +146,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="6dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="濮撳悕锛�"
android:textColor="#666666"
@@ -165,12 +169,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="6dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="韬唤璇佸彿锛�"
android:textColor="#666666"
@@ -188,12 +192,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="鍐滄埛缂栧彿锛�"
android:textColor="#666666"
@@ -213,7 +217,7 @@
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
+ android:layout_marginBottom="10dp"
app:cardCornerRadius="8dp"
app:cardElevation="2dp">
@@ -226,7 +230,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
+ android:layout_marginBottom="10dp"
android:text="璐圭敤淇℃伅"
android:textColor="#333333"
android:textSize="18sp"
@@ -240,7 +244,7 @@
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="宸ユ湰璐癸細"
android:textColor="#666666"
@@ -259,7 +263,6 @@
android:background="@null"
android:hint="璇疯緭鍏ュ伐鏈垂(閫夊~)"
android:inputType="numberDecimal"
- android:padding="12dp"
android:textColor="#333333"
android:textSize="@dimen/new_card_size" />
</LinearLayout>
@@ -273,7 +276,7 @@
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="鍏呭�奸噾棰濓細"
android:textColor="#666666"
@@ -292,7 +295,6 @@
android:background="@null"
android:hint="璇疯緭鍏ュ厖鍊奸噾棰�(閫夊~)"
android:inputType="numberDecimal"
- android:padding="12dp"
android:textColor="#333333"
android:textSize="@dimen/new_card_size" />
</LinearLayout>
@@ -302,12 +304,12 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="5dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
- android:layout_width="120dp"
+ android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="澶囨敞锛�"
android:textColor="#666666"
@@ -325,7 +327,6 @@
android:layout_height="wrap_content"
android:background="@null"
android:hint="璇疯緭鍏ュ娉�(閫夊~)"
- android:padding="12dp"
android:textColor="#333333"
android:textSize="@dimen/new_card_size" />
</LinearLayout>
@@ -348,7 +349,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="16dp"
+ android:layout_marginBottom="10dp"
android:text="鏀粯鏂瑰紡"
android:textColor="#333333"
android:textSize="18sp"
@@ -404,20 +405,18 @@
</RadioGroup>
</LinearLayout>
</androidx.cardview.widget.CardView>
+ <TextView
+ android:id="@+id/newCard_registBtn"
+ android:layout_width="match_parent"
+ android:layout_height="56dp"
+ android:layout_marginTop="15dp"
+ android:background="@color/bottom_color"
+ android:visibility="visible"
+ android:gravity="center"
+ android:text="纭寮�鍗�"
+ android:textColor="#FFFFFF"
+ android:textSize="16sp" />
</LinearLayout>
</ScrollView>
-
- <TextView
- android:id="@+id/newCard_registBtn"
- android:layout_width="match_parent"
- android:layout_height="56dp"
- android:layout_margin="16dp"
- android:background="#4285F4"
- android:visibility="gone"
- android:gravity="center"
- android:text="纭寮�鍗�"
- android:textColor="#FFFFFF"
- android:textSize="16sp"
- app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
--
Gitblit v1.8.0