图标 40→60sp,标题 18→24sp,描述 12→16sp, 按钮 14→18sp+加大内边距,进度条 8→12dp。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
91 lines
3.2 KiB
XML
91 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- OTA 更新弹窗(全屏覆盖,阻断用户操作)
|
||
手表屏幕 240x284px 120dpi,老年用户需要大字体大按钮 -->
|
||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:background="#E6000000"
|
||
android:clickable="true"
|
||
android:focusable="true">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:gravity="center"
|
||
android:orientation="vertical"
|
||
android:padding="16dp">
|
||
|
||
<!-- 图标 -->
|
||
<TextView
|
||
android:id="@+id/tvIcon"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:fontFamily="@font/iconfont"
|
||
android:text=""
|
||
android:textColor="@android:color/white"
|
||
android:textSize="60sp" />
|
||
|
||
<!-- 标题 -->
|
||
<TextView
|
||
android:id="@+id/tvTitle"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="12dp"
|
||
android:text="发现新版本"
|
||
android:textColor="@android:color/white"
|
||
android:textSize="24sp"
|
||
android:textStyle="bold" />
|
||
|
||
<!-- 描述(下载中显示"请勿关机!正在升级系统...") -->
|
||
<TextView
|
||
android:id="@+id/tvDesc"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="6dp"
|
||
android:textColor="#AAFFFFFF"
|
||
android:textSize="16sp"
|
||
android:visibility="gone" />
|
||
|
||
<!-- 进度条(下载中显示) -->
|
||
<FrameLayout
|
||
android:id="@+id/progressContainer"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="12dp"
|
||
android:layout_marginTop="16dp"
|
||
android:background="#33FFFFFF"
|
||
android:visibility="gone">
|
||
|
||
<View
|
||
android:id="@+id/progressBar"
|
||
android:layout_width="0dp"
|
||
android:layout_height="match_parent"
|
||
android:background="#4CAF50" />
|
||
</FrameLayout>
|
||
|
||
<!-- 进度文字 -->
|
||
<TextView
|
||
android:id="@+id/tvProgress"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="6dp"
|
||
android:textColor="#AAFFFFFF"
|
||
android:textSize="16sp"
|
||
android:visibility="gone" />
|
||
|
||
<!-- 按钮(立即更新 / 重新下载) -->
|
||
<TextView
|
||
android:id="@+id/btnAction"
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="20dp"
|
||
android:background="@drawable/bg_btn_primary"
|
||
android:paddingHorizontal="32dp"
|
||
android:paddingVertical="12dp"
|
||
android:text="立即更新"
|
||
android:textColor="@android:color/white"
|
||
android:textSize="18sp" />
|
||
|
||
</LinearLayout>
|
||
|
||
</FrameLayout>
|