初始化橘视厅酒店版Android项目
This commit is contained in:
192
app/src/main/res/layout/dialog_payment.xml
Normal file
192
app/src/main/res/layout/dialog_payment.xml
Normal file
@@ -0,0 +1,192 @@
|
||||
<?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" />
|
||||
|
||||
<!-- 二维码区域(新增) -->
|
||||
<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>
|
||||
Reference in New Issue
Block a user