packServer/AndroidStation/app/src/main/res/layout/activity_settings.xml
liufumingren 43dae198db chore: Android 扫码台设置页、发布脚本健壮性与文档同步
- Android 扫码台:设置页新增「设为默认桌面 / 解除默认桌面 / 回到盒子桌面 / 打开系统设置」等现场免 adb 操作
- android_client/build.ps1:gradle 的 javac 提示走 stderr,改成 2>&1 逐行 Write-Host,避免被当成构建失败
- deploy-lib.cjs:ssh 加 ServerAliveInterval/CountMax 与 -n,避免发布脚本卡在远端命令结束前不退出
- set-password.js:重置密码时补写 password_changed_at(否则旧 JWT 不失效)
- .gitignore:忽略 video_split/(调试用的视频拆帧产物)
- 文档同步:README / backend README(微信网关、成员扫码绑定、平台管理员、顶栏下载入口、已下线的自建微信表)/
  database README / desktop README

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-29 17:21:41 +08:00

288 lines
11 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<!-- 服务设置:设备名 / 服务端口 / 发现端口 / 启停开关 -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/bg"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_header"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="32dp"
android:paddingTop="14dp"
android:paddingEnd="32dp"
android:paddingBottom="14dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_title"
android:textColor="@color/text_primary"
android:textSize="26sp"
android:textStyle="bold" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_header_hint"
android:textColor="@color/text_secondary"
android:textSize="14sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="32dp"
android:paddingTop="20dp"
android:paddingEnd="32dp"
android:paddingBottom="20dp">
<!-- 设备 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_section_device"
android:textColor="@color/text_primary"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
style="@style/SettingsLabel"
android:text="@string/settings_name_label" />
<EditText
android:id="@+id/et_device_name"
style="@style/SettingsInput"
android:hint="@string/settings_name_hint"
android:inputType="text"
android:maxLength="32" />
</LinearLayout>
<!-- 服务 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_section_service"
android:textColor="@color/text_primary"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
style="@style/SettingsLabel"
android:text="@string/settings_service_port_label" />
<EditText
android:id="@+id/et_service_port"
style="@style/SettingsInput"
android:inputType="number"
android:maxLength="5" />
<TextView
style="@style/SettingsLabel"
android:text="@string/settings_discovery_port_label" />
<EditText
android:id="@+id/et_discovery_port"
style="@style/SettingsInput"
android:inputType="number"
android:maxLength="5" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/sw_service_enabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:text="@string/settings_service_enabled"
android:textColor="@color/text_primary"
android:textSize="16sp" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/sw_discovery_enabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/settings_discovery_enabled"
android:textColor="@color/text_primary"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:lineSpacingExtra="4dp"
android:text="@string/settings_note"
android:textColor="@color/text_secondary"
android:textSize="14sp" />
</LinearLayout>
<!-- 开机 / 桌面(kiosk) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_section_home"
android:textColor="@color/text_primary"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/settings_home_hint"
android:textColor="@color/text_secondary"
android:textSize="14sp" />
<TextView
android:id="@+id/tv_home_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textColor="@color/text_primary"
android:textSize="16sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:orientation="horizontal">
<Button
android:id="@+id/btn_set_home"
style="@style/ActionButton"
android:text="@string/settings_action_set_home" />
<Button
android:id="@+id/btn_clear_home"
style="@style/ActionButton"
android:layout_marginStart="12dp"
android:text="@string/settings_action_clear_home" />
<Button
android:id="@+id/btn_free_launcher"
style="@style/ActionButton"
android:layout_marginStart="12dp"
android:text="@string/settings_action_back_to_launcher" />
<Button
android:id="@+id/btn_system_settings"
style="@style/ActionButton"
android:layout_marginStart="12dp"
android:text="@string/settings_action_system_settings" />
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/settings_home_clear_hint"
android:textColor="@color/text_secondary"
android:textSize="14sp" />
</LinearLayout>
<!-- 当前状态 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_card"
android:orientation="vertical"
android:padding="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/settings_section_status"
android:textColor="@color/text_primary"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_settings_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lineSpacingExtra="5dp"
android:textColor="@color/text_primary"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/divider" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_header"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="24dp"
android:paddingTop="12dp"
android:paddingEnd="24dp"
android:paddingBottom="12dp">
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
<Button
android:id="@+id/btn_back"
style="@style/ActionButton"
android:text="@string/settings_back" />
<Button
android:id="@+id/btn_save"
style="@style/ActionButton"
android:layout_marginStart="12dp"
android:text="@string/settings_save" />
</LinearLayout>
</LinearLayout>