1. 启动时序修复:Launcher 从 ActivationActivity 改为 HomeActivity,
已激活用户直接进首页,不再闪现激活页
2. 详情页布局重构:左右分栏设计(左侧海报 + 右侧信息/操作),
全屏背景图 + 渐变遮罩,TV 端焦点导航
3. 对接后端取消订单接口 POST /api/jst/daycard/cancel/{orderNo},
用户关闭支付弹窗时自动取消未支付订单
218 lines
7.8 KiB
XML
218 lines
7.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- 支付对话框布局(改造后:支持微信扫码支付二维码展示) -->
|
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/bg_dialog"
|
|
android:fillViewport="true">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:background="@drawable/bg_dialog"
|
|
android:padding="@dimen/qb_px_20"
|
|
android:minWidth="320dp"
|
|
android:gravity="center_horizontal">
|
|
|
|
<!-- 标题 -->
|
|
<TextView
|
|
android:id="@+id/tvPayTitle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="微信扫码支付"
|
|
android:textColor="@color/text_primary"
|
|
android:textSize="@dimen/mg_sp_20"
|
|
android:textStyle="bold"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_16" />
|
|
|
|
<!-- 微信支付品牌标识(显式标识,满足微信支付商户接入规范) -->
|
|
<LinearLayout
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="@dimen/qb_px_12">
|
|
|
|
<ImageView
|
|
android:layout_width="28dp"
|
|
android:layout_height="28dp"
|
|
android:src="@drawable/ic_wechat_pay_logo"
|
|
android:scaleType="fitCenter"
|
|
android:layout_marginEnd="@dimen/qb_px_8"
|
|
android:contentDescription="微信支付" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="微信支付"
|
|
android:textColor="@color/wechat_green"
|
|
android:textSize="@dimen/mg_sp_18"
|
|
android:textStyle="bold" />
|
|
</LinearLayout>
|
|
|
|
<!-- 二维码区域(新增) -->
|
|
<FrameLayout
|
|
android:id="@+id/flQrcode"
|
|
android:layout_width="200dp"
|
|
android:layout_height="200dp"
|
|
android:layout_gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_12">
|
|
|
|
<!-- 二维码图片 -->
|
|
<ImageView
|
|
android:id="@+id/ivQrcode"
|
|
android:layout_width="200dp"
|
|
android:layout_height="200dp"
|
|
android:scaleType="fitCenter"
|
|
android:background="@drawable/bg_qrcode_white"
|
|
android:padding="8dp"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 加载中提示(生成二维码时短暂显示) -->
|
|
<ProgressBar
|
|
android:id="@+id/pbQrcodeLoading"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:visibility="visible" />
|
|
</FrameLayout>
|
|
|
|
<!-- 金额 -->
|
|
<TextView
|
|
android:id="@+id/tvPayAmount"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/accent"
|
|
android:textSize="@dimen/mg_sp_24"
|
|
android:textStyle="bold"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_8"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 倒计时(新增) -->
|
|
<TextView
|
|
android:id="@+id/tvCountdown"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/accent"
|
|
android:textSize="@dimen/mg_sp_18"
|
|
android:textStyle="bold"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_8"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 状态文本 -->
|
|
<TextView
|
|
android:id="@+id/tvPayStatus"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="@dimen/mg_sp_16"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_12" />
|
|
|
|
<!-- 通用进度条(网络请求时显示) -->
|
|
<ProgressBar
|
|
android:id="@+id/progressBar"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_12"
|
|
android:visibility="visible" />
|
|
|
|
<!-- 订单号 -->
|
|
<TextView
|
|
android:id="@+id/tvPayOrderNo"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@color/text_tertiary"
|
|
android:textSize="@dimen/mg_sp_14"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="@dimen/qb_px_12"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 重新生成按钮(超时后显示) -->
|
|
<TextView
|
|
android:id="@+id/btnRegenerate"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="重新生成二维码"
|
|
android:textColor="@color/text_primary"
|
|
android:textSize="@dimen/mg_sp_16"
|
|
android:gravity="center"
|
|
android:paddingVertical="@dimen/qb_px_10"
|
|
android:background="@drawable/bg_play_button"
|
|
android:layout_marginBottom="@dimen/qb_px_8"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:clickable="true"
|
|
android:nextFocusDown="@id/btnClose"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 关闭按钮 -->
|
|
<TextView
|
|
android:id="@+id/btnClose"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="关闭"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="@dimen/mg_sp_16"
|
|
android:gravity="center"
|
|
android:paddingVertical="@dimen/qb_px_10"
|
|
android:background="@drawable/bg_button_secondary"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:clickable="true"
|
|
android:nextFocusUp="@id/btnRegenerate"
|
|
android:visibility="gone" />
|
|
|
|
<!-- 确认/取消按钮区(保留兼容旧流程,默认隐藏) -->
|
|
<LinearLayout
|
|
android:id="@+id/llButtons"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center"
|
|
android:visibility="gone">
|
|
|
|
<TextView
|
|
android:id="@+id/btnCancel"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="取消"
|
|
android:textColor="@color/text_secondary"
|
|
android:textSize="@dimen/mg_sp_16"
|
|
android:gravity="center"
|
|
android:paddingVertical="@dimen/qb_px_10"
|
|
android:background="@drawable/bg_search_input"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:clickable="true"
|
|
android:nextFocusRight="@id/btnConfirm"
|
|
android:layout_marginEnd="@dimen/qb_px_8" />
|
|
|
|
<TextView
|
|
android:id="@+id/btnConfirm"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="确认支付"
|
|
android:textColor="@color/text_primary"
|
|
android:textSize="@dimen/mg_sp_16"
|
|
android:gravity="center"
|
|
android:paddingVertical="@dimen/qb_px_10"
|
|
android:background="@drawable/bg_play_button"
|
|
android:focusable="true"
|
|
android:focusableInTouchMode="true"
|
|
android:clickable="true"
|
|
android:nextFocusLeft="@id/btnCancel"
|
|
android:layout_marginStart="@dimen/qb_px_8" />
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|