From c3edd4a3122b711bc6a0bfef56b6ff6bf5ae03e2 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期二, 13 五月 2025 09:09:23 +0800
Subject: [PATCH] feat(generallibrary): 优化用户开卡流程并添加支付方式功能

---
 generallibrary/src/main/res/layout/activity_new_card_1_ge.xml |  227 +++++++++++++++++++++++++++-----------------------------
 1 files changed, 109 insertions(+), 118 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..4567eec 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"
@@ -24,7 +24,7 @@
         android:layout_marginTop="24dp"
         android:layout_marginEnd="16dp"
         android:layout_marginBottom="24dp"
-        android:visibility="gone"
+        android:visibility="visible"
         app:cardBackgroundColor="@android:color/white"
         app:cardCornerRadius="12dp"
         app:cardElevation="4dp"
@@ -54,9 +54,10 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:gravity="center"
-                android:text="锛堝皢鑾峰彇鐗╃悊鍗″崱鍙凤級"
-                android:textColor="#999999"
+                android:text="灏嗚繘琛屽垵濮嬪寲鍗$墖\n鑰楁椂杈冮暱璇蜂笉瑕佺Щ鍔ㄥ崱鐗�"
+                android:textColor="@color/base_blue_bg"
                 android:textSize="18sp"
+                android:layout_marginTop="20dp"
                 android:textStyle="bold" />
 
             <ImageView
@@ -79,24 +80,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"
+        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 +115,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 +124,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 +147,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 +170,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 +193,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 +218,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 +231,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,40 +245,7 @@
                         android:orientation="horizontal">
 
                         <TextView
-                            android:layout_width="120dp"
-                            android:layout_height="wrap_content"
-                            android:text="宸ユ湰璐癸細"
-                            android:textColor="#666666"
-                            android:textSize="@dimen/new_card_size" />
-
-                        <LinearLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="wrap_content"
-                            android:background="#FFFFFF"
-                            android:orientation="vertical">
-
-                            <EditText
-                                android:id="@+id/newCard_rechargeAmount"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:background="@null"
-                                android:hint="璇疯緭鍏ュ伐鏈垂(閫夊~)"
-                                android:inputType="numberDecimal"
-                                android:padding="12dp"
-                                android:textColor="#333333"
-                                android:textSize="@dimen/new_card_size" />
-                        </LinearLayout>
-                    </LinearLayout>
-
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_marginBottom="12dp"
-                        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"
@@ -282,22 +254,34 @@
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:background="#FFFFFF"
-                            android:orientation="vertical">
+                            android:background="@drawable/edit_text_bg_selector"
+                            android:orientation="horizontal"
+                            android:gravity="center_vertical"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="10dp"
+                            android:paddingTop="8dp"
+                            android:paddingBottom="8dp">
 
                             <EditText
-                                android:id="@+id/newCard_cardFee"
-                                android:layout_width="match_parent"
+                                android:id="@+id/newCard_rechargeAmount"
+                                android:layout_width="0dp"
+                                android:layout_weight="1"
                                 android:layout_height="wrap_content"
                                 android:background="@null"
                                 android:hint="璇疯緭鍏ュ厖鍊奸噾棰�(閫夊~)"
                                 android:inputType="numberDecimal"
-                                android:padding="12dp"
                                 android:textColor="#333333"
+                                android:textColorHint="#BBBBBB"
+                                android:textSize="@dimen/new_card_size" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鍏�"
+                                android:textColor="#666666"
                                 android:textSize="@dimen/new_card_size" />
                         </LinearLayout>
                     </LinearLayout>
-
 
                     <LinearLayout
                         android:layout_width="match_parent"
@@ -307,7 +291,53 @@
                         android:orientation="horizontal">
 
                         <TextView
-                            android:layout_width="120dp"
+                            android:layout_width="105dp"
+                            android:layout_height="wrap_content"
+                            android:text="宸ユ湰璐癸細"
+                            android:textColor="#666666"
+                            android:textSize="@dimen/new_card_size" />
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:background="@drawable/edit_text_bg_selector"
+                            android:orientation="horizontal"
+                            android:gravity="center_vertical"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="10dp"
+                            android:paddingTop="8dp"
+                            android:paddingBottom="8dp">
+
+                            <EditText
+                                android:id="@+id/newCard_cardFee"
+                                android:layout_width="0dp"
+                                android:layout_weight="1"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:hint="璇疯緭鍏ュ伐鏈垂(閫夊~)"
+                                android:inputType="numberDecimal"
+                                android:textColor="#333333"
+                                android:textColorHint="#BBBBBB"
+                                android:textSize="@dimen/new_card_size" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="鍏�"
+                                android:textColor="#666666"
+                                android:textSize="@dimen/new_card_size" />
+                        </LinearLayout>
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginBottom="5dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="105dp"
                             android:layout_height="wrap_content"
                             android:text="澶囨敞锛�"
                             android:textColor="#666666"
@@ -316,8 +346,12 @@
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="wrap_content"
-                            android:background="#FFFFFF"
-                            android:orientation="vertical">
+                            android:background="@drawable/edit_text_bg_selector"
+                            android:orientation="vertical"
+                            android:paddingStart="10dp"
+                            android:paddingEnd="10dp"
+                            android:paddingTop="8dp"
+                            android:paddingBottom="8dp">
 
                             <EditText
                                 android:id="@+id/newCard_remark"
@@ -325,8 +359,8 @@
                                 android:layout_height="wrap_content"
                                 android:background="@null"
                                 android:hint="璇疯緭鍏ュ娉�(閫夊~)"
-                                android:padding="12dp"
                                 android:textColor="#333333"
+                                android:textColorHint="#BBBBBB"
                                 android:textSize="@dimen/new_card_size" />
                         </LinearLayout>
                     </LinearLayout>
@@ -348,7 +382,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"
@@ -359,65 +393,22 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="horizontal">
-
-                        <RadioButton
-                            android:id="@+id/newCard_cashPayment"
-                            android:layout_width="0dp"
-                            android:layout_height="40dp"
-                            android:layout_marginRight="15dp"
-                            android:layout_weight="1"
-                            android:background="@drawable/radio_selector"
-                            android:button="@null"
-                            android:checked="true"
-                            android:gravity="center"
-
-                            android:text="鐜伴噾"
-                            android:textColor="@color/radio_button_text_color"
-                            android:textSize="@dimen/new_card_size" />
-
-                        <RadioButton
-                            android:id="@+id/newCard_posPayment"
-                            android:layout_width="0dp"
-                            android:layout_height="40dp"
-                            android:layout_marginRight="15dp"
-                            android:layout_weight="1"
-                            android:background="@drawable/radio_selector"
-                            android:button="@null"
-                            android:gravity="center"
-
-                            android:text="POS鏈�"
-                            android:textColor="@color/radio_button_text_color"
-                            android:textSize="@dimen/new_card_size" />
-
-                        <RadioButton
-                            android:id="@+id/newCard_bankTransfer"
-                            android:layout_width="0dp"
-                            android:layout_height="40dp"
-                            android:layout_weight="1"
-                            android:background="@drawable/radio_selector"
-                            android:button="@null"
-                            android:gravity="center"
-
-                            android:text="閾惰杞处"
-                            android:textColor="@color/radio_button_text_color"
-                            android:textSize="@dimen/new_card_size" />
+                        <!-- 鍔ㄦ�佹坊鍔燫adioButton锛岀Щ闄ゅ浐瀹氱殑RadioButton -->
                     </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