You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
284 lines
11 KiB
284 lines
11 KiB
<?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:orientation="vertical"
|
|
android:padding="16dp"
|
|
android:background="@color/white">
|
|
|
|
<!-- 标题栏 -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="调试工具"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@color/black"
|
|
android:gravity="center"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<!-- 按钮区域 - 使用GridLayout实现每行3个按钮 -->
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<!-- 第一行按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnTestAutoStart"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="测试自启动"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnTestDirectStart"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="测试直接启动"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnShowLogPath"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="显示日志路径"
|
|
android:layout_marginStart="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 第二行按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnWriteTestLog"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="写入测试日志"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnShowAutoStartStatus"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="显示自启动状态"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnResetAutoStartStats"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="重置统计信息"
|
|
android:layout_marginStart="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 第三行按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnShowDeviceInfo"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="显示设备信息"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnTestNetwork"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="测试网络连接"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnClearLogs"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="清空日志"
|
|
android:layout_marginStart="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 第四行按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnTestShellCommand"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="测试Shell命令"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnTestAlarm"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="测试闹钟"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnInitFaceSDK"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="初始化人脸SDK"
|
|
android:layout_marginStart="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 第五行按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnClose"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="关闭"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnFaceRecognitionTest"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="人脸识别测试"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnCheckDeviceConfig"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="查验设备配置"
|
|
android:layout_marginStart="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- 第六行按钮 - 新增华为扫码测试按钮 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnTestHuaWeiScan"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="华为扫码测试"
|
|
android:layout_marginEnd="4dp"
|
|
android:textSize="12sp" />
|
|
|
|
<!-- 占位按钮,保持布局对称 -->
|
|
<Button
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:visibility="invisible"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginEnd="4dp" />
|
|
|
|
<!-- 占位按钮,保持布局对称 -->
|
|
<Button
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:visibility="invisible"
|
|
android:layout_marginStart="4dp" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|
|
|
|
<!-- 日志输出区域 -->
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="日志输出:"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="@color/black"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<ScrollView
|
|
android:id="@+id/logScrollView"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="200dp"
|
|
android:background="@drawable/log_background"
|
|
android:padding="8dp">
|
|
|
|
<TextView
|
|
android:id="@+id/tvLogOutput"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="日志将在此显示..."
|
|
android:textSize="12sp"
|
|
android:textColor="@color/black"
|
|
android:fontFamily="monospace" />
|
|
|
|
</ScrollView>
|
|
|
|
</LinearLayout>
|