fix: 绑定页最大化UI - 二维码撑满宽度

- 二维码框改为 match_parent + weight=1,撑满可用空间
- 标题 28sp,说明 16sp,配对中 22sp
- 整体布局紧凑,最大化利用屏幕空间

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dongliang
2026-04-27 16:52:12 +09:30
parent 727e20df45
commit 145105ffe9

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- BindFragment二维码配对页面全屏无 NavBar <!-- BindFragment二维码配对页面全屏无 NavBar
两种状态qrWrap=二维码展示, loadingWrap=配对中 用户群体为老年人,所有元素尽可能大
注意:用户群体为老年人,字体和元素需要足够大 --> 屏幕 240×284pxSafeArea 内约 208×244px -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@@ -12,28 +12,31 @@
android:id="@+id/qrWrap" android:id="@+id/qrWrap"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:gravity="center" android:gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
android:paddingStart="20dp" android:paddingStart="16dp"
android:paddingEnd="20dp"> android:paddingEnd="16dp"
android:paddingTop="24dp"
android:paddingBottom="20dp">
<!-- 标题 --> <!-- 标题(尽可能大) -->
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="扫码配对" android:text="扫码配对"
android:textColor="@color/text_primary" android:textColor="@color/text_primary"
android:textSize="24sp" android:textSize="28sp"
android:textStyle="bold" android:textStyle="bold"
android:layout_marginBottom="14dp" /> android:layout_marginBottom="10dp" />
<!-- 二维码白色圆角背景框 --> <!-- 二维码白色圆角背景框(撑满宽度) -->
<FrameLayout <FrameLayout
android:layout_width="150dp" android:layout_width="match_parent"
android:layout_height="150dp" android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/bg_qr_frame" android:background="@drawable/bg_qr_frame"
android:padding="10dp" android:padding="8dp"
android:layout_marginBottom="14dp"> android:layout_marginBottom="10dp">
<ImageView <ImageView
android:id="@+id/ivQrCode" android:id="@+id/ivQrCode"
@@ -49,10 +52,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:lineSpacingMultiplier="1.8" android:lineSpacingMultiplier="1.6"
android:text="扫码下载小趣智慧清洁App\n在App中扫码添加手表" android:text="扫码下载小趣智慧清洁App\n在App中扫码添加手表"
android:textColor="@color/text_secondary" android:textColor="@color/text_secondary"
android:textSize="15sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
@@ -66,17 +69,17 @@
android:visibility="gone"> android:visibility="gone">
<ProgressBar <ProgressBar
android:layout_width="40dp" android:layout_width="48dp"
android:layout_height="40dp" android:layout_height="48dp"
android:indeterminateTint="@color/text_secondary" android:indeterminateTint="@color/text_secondary"
android:layout_marginBottom="@dimen/spacing_lg" /> android:layout_marginBottom="16dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="正在配对…" android:text="正在配对…"
android:textColor="@color/text_secondary" android:textColor="@color/text_secondary"
android:textSize="18sp" /> android:textSize="22sp" />
</LinearLayout> </LinearLayout>