From 899cb6ce779b24a659ec3515dd3fb1cd1afef7d2 Mon Sep 17 00:00:00 2001 From: zuojincheng <lf_zuo@163.com> Date: 星期二, 24 六月 2025 14:02:46 +0800 Subject: [PATCH] feat(card): 增加区域表号卡制作功能 --- generallibrary/src/main/res/layout/activity_card_replace.xml | 308 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 183 insertions(+), 125 deletions(-) diff --git a/generallibrary/src/main/res/layout/activity_card_replace.xml b/generallibrary/src/main/res/layout/activity_card_replace.xml index 8146c65..25c864b 100644 --- a/generallibrary/src/main/res/layout/activity_card_replace.xml +++ b/generallibrary/src/main/res/layout/activity_card_replace.xml @@ -67,7 +67,7 @@ android:layout_below="@+id/tv_title" android:layout_marginBottom="20dp" android:gravity="center" - android:text="璇峰皢闇�瑕佽ˉ鍔炵殑鍗$墖璐村湪璁惧涓婅繘琛岃鍙�" + android:text="璇峰皢鏂板崱璐村湪璁惧涓婅繘琛岃鍙�" android:textColor="#333333" android:textSize="@dimen/text_size" android:textStyle="bold" /> @@ -88,7 +88,7 @@ android:layout_height="wrap_content" android:layout_below="@+id/iv_nfc" android:gravity="center" - android:text="璇蜂繚鎸佹墜鎸佹満鍜屽崱鐗囦笉瑕佺Щ鍔�" + android:text="璇诲彇鏂板崱鍚庡皢鏄剧ず鍘熷崱淇℃伅杩涜琛ュ崱鎿嶄綔" android:textColor="#666666" android:textSize="@dimen/new_card_size" /> @@ -121,66 +121,29 @@ android:layout_height="wrap_content" android:orientation="vertical"> - <!-- 褰撳墠鍗″湴鍧�鏄剧ず鍖哄煙 --> + <!-- 鍗$墖淇℃伅鍖哄煙 --> <androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - app:cardCornerRadius="8dp" - app:cardElevation="2dp"> + app:cardCornerRadius="6dp" + app:cardElevation="1dp"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:padding="16dp"> + android:padding="14dp"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - android:text="褰撳墠鍗″湴鍧�" + android:layout_marginBottom="10dp" + android:text="鍗$墖淇℃伅" android:textColor="@color/base_blue_bg" - android:textSize="18sp" + android:textSize="17sp" android:textStyle="bold" /> - <TextView - android:id="@+id/tv_current_card_address" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="#F5F5F5" - android:padding="12dp" - android:text="--" - android:textColor="#333333" - android:textSize="16sp" - android:textIsSelectable="true" /> - - </LinearLayout> - </androidx.cardview.widget.CardView> - - <!-- 鏃у崱淇℃伅鍖哄煙 --> - <androidx.cardview.widget.CardView - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:cardCornerRadius="8dp" - app:cardElevation="2dp"> - - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:padding="16dp"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="12dp" - android:text="鏃у崱淇℃伅" - android:textColor="@color/base_blue_bg" - android:textSize="18sp" - android:textStyle="bold" /> - - <!-- 鎸佸崱浜� --> + <!-- 鏂板崱鍗″湴鍧� --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -188,27 +151,123 @@ android:background="#F8F9FA" android:gravity="center_vertical" android:orientation="horizontal" - android:padding="12dp"> + android:padding="8dp"> <TextView - android:layout_width="100dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="鎸佸崱浜猴細" + android:text="鏂板崱鍗″湴鍧�锛�" android:textColor="#333333" - android:textSize="16sp" + android:textSize="15sp" android:textStyle="bold" /> <TextView - android:id="@+id/tv_user_name" + android:id="@+id/tv_current_card_address" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:background="#F5F5F5" + android:padding="8dp" + android:text="--" + android:textColor="#333333" + android:textSize="15sp" + android:textIsSelectable="true" /> + </LinearLayout> + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginTop="2dp" + android:background="@color/base_blue_bg" /> + <!-- 鎸佸崱浜哄拰鍗$墖鐘舵�� - 鍚屼竴琛屾樉绀� --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="2dp" + android:layout_marginBottom="1dp" + android:background="#FFFFFF" + android:orientation="horizontal" + android:padding="10dp"> + + <!-- 鎸佸崱浜� --> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="鎸佸崱浜�" + android:textColor="#333333" + android:textSize="13sp" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_user_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="3dp" + android:text="--" + android:textColor="#666666" + android:textSize="15sp" /> + </LinearLayout> + + <!-- 鍗$墖鐘舵�� --> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="鍗$墖鐘舵��" + android:textColor="#333333" + android:textSize="13sp" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_card_status" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="3dp" + android:text="姝e父" + android:textColor="#4CAF50" + android:textSize="15sp" /> + </LinearLayout> + </LinearLayout> + + <!-- 鍗″彿 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="1dp" + android:background="#F8F9FA" + android:gravity="center_vertical" + android:orientation="horizontal" + android:padding="8dp"> + + <TextView + android:layout_width="80dp" + android:layout_height="wrap_content" + android:text="鍗″彿锛�" + android:textColor="#333333" + android:textSize="14sp" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_card_number" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="--" android:textColor="#666666" - android:textSize="16sp" /> + android:textSize="14sp" /> </LinearLayout> - <!-- 鍗$墖鐘舵�� --> + <!-- 瀹㈡埛缂栧彿 --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -216,53 +275,24 @@ android:background="#FFFFFF" android:gravity="center_vertical" android:orientation="horizontal" - android:padding="12dp"> + android:padding="8dp"> <TextView - android:layout_width="100dp" + android:layout_width="80dp" android:layout_height="wrap_content" - android:text="鍗$墖鐘舵�侊細" + android:text="瀹㈡埛缂栧彿锛�" android:textColor="#333333" - android:textSize="16sp" + android:textSize="14sp" android:textStyle="bold" /> <TextView - android:id="@+id/tv_card_status" + android:id="@+id/tv_customer_id" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:text="姝e父" - android:textColor="#4CAF50" - android:textSize="16sp" /> - </LinearLayout> - - <!-- 鍗″唴浣欓 --> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="1dp" - android:background="#F8F9FA" - android:gravity="center_vertical" - android:orientation="horizontal" - android:padding="12dp"> - - <TextView - android:layout_width="100dp" - android:layout_height="wrap_content" - android:text="鍗″唴浣欓锛�" - android:textColor="#333333" - android:textSize="16sp" - android:textStyle="bold" /> - - <TextView - android:id="@+id/tv_card_balance" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:text="0.00鍏�" - android:textColor="#FF6B35" - android:textSize="16sp" - android:textStyle="bold" /> + android:text="--" + android:textColor="#666666" + android:textSize="14sp" /> </LinearLayout> <!-- 鎵嬫満鍙� --> @@ -272,14 +302,14 @@ android:background="#FFFFFF" android:gravity="center_vertical" android:orientation="horizontal" - android:padding="12dp"> + android:padding="8dp"> <TextView - android:layout_width="100dp" + android:layout_width="80dp" android:layout_height="wrap_content" android:text="鎵嬫満鍙凤細" android:textColor="#333333" - android:textSize="16sp" + android:textSize="14sp" android:textStyle="bold" /> <TextView @@ -289,7 +319,35 @@ android:layout_weight="1" android:text="--" android:textColor="#666666" - android:textSize="16sp" /> + android:textSize="14sp" /> + </LinearLayout> + <!-- 鍗″唴浣欓 --> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="1dp" + android:background="#F8F9FA" + android:gravity="center_vertical" + android:orientation="horizontal" + android:padding="8dp"> + + <TextView + android:layout_width="80dp" + android:layout_height="wrap_content" + android:text="鍗″唴浣欓锛�" + android:textColor="#333333" + android:textSize="14sp" + android:textStyle="bold" /> + + <TextView + android:id="@+id/tv_card_balance" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:text="0.00鍏�" + android:textColor="#FF6B35" + android:textSize="14sp" + android:textStyle="bold" /> </LinearLayout> </LinearLayout> @@ -343,6 +401,36 @@ android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginBottom="16dp"> + <!-- 杩斿洖閲戦杈撳叆 --> + <LinearLayout + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="8dp" + android:orientation="vertical"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="6dp" + android:text="杩斿洖閲戦锛堝厓锛�" + android:textColor="#333333" + android:textSize="14sp" + android:textStyle="bold" /> + + <EditText + android:id="@+id/et_return_amount" + android:layout_width="match_parent" + android:layout_height="48dp" + android:background="@drawable/edit_text_bg" + android:hint="杩斿洖閲戦" + android:inputType="numberDecimal" + android:padding="12dp" + android:text="" + android:textColor="#333333" + android:textColorHint="#999999" + android:textSize="16sp" /> + </LinearLayout> <!-- 宸ユ湰璐硅緭鍏� --> <LinearLayout @@ -375,36 +463,6 @@ android:textSize="16sp" /> </LinearLayout> - <!-- 杩斿洖閲戦杈撳叆 --> - <LinearLayout - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_marginStart="8dp" - android:orientation="vertical"> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginBottom="6dp" - android:text="杩斿洖閲戦锛堝厓锛�" - android:textColor="#333333" - android:textSize="14sp" - android:textStyle="bold" /> - - <EditText - android:id="@+id/et_return_amount" - android:layout_width="match_parent" - android:layout_height="48dp" - android:background="@drawable/edit_text_bg" - android:hint="杩斿洖閲戦" - android:inputType="numberDecimal" - android:padding="12dp" - android:text="0" - android:textColor="#333333" - android:textColorHint="#999999" - android:textSize="16sp" /> - </LinearLayout> </LinearLayout> -- Gitblit v1.8.0