<?xml version="1.0" encoding="utf-8"?>
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
android:background="@color/gray_bg"
|
android:orientation="vertical">
|
|
<include layout="@layout/include_head" />
|
|
<ScrollView
|
android:layout_width="match_parent"
|
android:layout_height="match_parent">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:padding="15dp">
|
|
<!-- Monitoring Details Section -->
|
<androidx.cardview.widget.CardView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
app:cardCornerRadius="12dp"
|
app:cardElevation="2dp"
|
app:cardBackgroundColor="@color/white"
|
android:layout_marginBottom="24dp">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
|
<!-- Card Header -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
android:gravity="center_vertical"
|
android:padding="16dp"
|
android:background="#FAFAFA">
|
|
<View
|
android:layout_width="4dp"
|
android:layout_height="16dp"
|
android:background="@color/base_color"
|
android:layout_marginEnd="8dp"/>
|
|
<TextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:text="自检监测"
|
android:textSize="16sp"
|
android:textStyle="bold"
|
android:textColor="#333333" />
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:background="#EEEEEE"/>
|
|
<!-- Card Content -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:padding="16dp">
|
|
<HorizontalScrollView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:scrollbars="none">
|
|
<androidx.recyclerview.widget.RecyclerView
|
android:id="@+id/rv_grid"
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content" />
|
</HorizontalScrollView>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:background="#EEEEEE"
|
android:layout_marginTop="16dp"
|
android:layout_marginBottom="12dp"/>
|
|
<!-- Legend -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
android:gravity="center_vertical"
|
android:paddingStart="4dp">
|
|
<View
|
android:layout_width="12dp"
|
android:layout_height="12dp"
|
android:background="@drawable/bg_box_full"
|
android:layout_marginEnd="6dp"/>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="自检成功"
|
android:textSize="12sp"
|
android:textColor="#666666"
|
android:layout_marginEnd="16dp"/>
|
|
<View
|
android:layout_width="12dp"
|
android:layout_height="12dp"
|
android:background="@drawable/bg_box_error"
|
android:layout_marginEnd="6dp"/>
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="自检失败"
|
android:textSize="12sp"
|
android:textColor="#666666"
|
android:layout_marginEnd="16dp"/>
|
</LinearLayout>
|
|
<!-- Start/End Check Buttons -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
android:layout_marginTop="20dp">
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_start_check"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:text="开始自检"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/base_color"
|
app:qmui_radius="8dp"
|
android:layout_marginRight="10dp"/>
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_end_check"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:text="结束自检"
|
android:textColor="@color/base_color"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/white"
|
app:qmui_borderColor="@color/base_color"
|
app:qmui_borderWidth="1dp"
|
app:qmui_radius="8dp"
|
android:layout_marginLeft="10dp"/>
|
</LinearLayout>
|
|
</LinearLayout>
|
</LinearLayout>
|
</androidx.cardview.widget.CardView>
|
|
<!-- Customer Use Section -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:background="@drawable/bg_card"
|
android:orientation="vertical"
|
android:padding="20dp">
|
|
<!-- Threshold Row -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:layout_marginBottom="25dp">
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="阈值"
|
android:textColor="@color/base_text"
|
android:textSize="15sp"
|
android:textStyle="bold"
|
android:layout_marginBottom="10dp"/>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
|
<Spinner
|
android:id="@+id/sp_threshold_mode"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1.5"
|
android:entries="@array/threshold_modes"
|
android:background="@drawable/bg_input_field"
|
android:paddingStart="10dp"
|
android:layout_marginRight="10dp" />
|
|
<EditText
|
android:id="@+id/et_threshold_value"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:background="@drawable/bg_input_field"
|
android:gravity="center"
|
android:hint="1-30"
|
android:inputType="number"
|
android:textSize="14sp"/>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="10dp"
|
android:orientation="horizontal">
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_threshold_read"
|
android:layout_width="0dp"
|
android:layout_height="45dp"
|
android:layout_weight="1"
|
android:text="读取"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/base_color"
|
app:qmui_radius="8dp"
|
android:layout_marginRight="10dp"/>
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_threshold_write"
|
android:layout_width="0dp"
|
android:layout_height="45dp"
|
android:layout_weight="1"
|
android:text="写入"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/base_color_s"
|
app:qmui_radius="8dp"/>
|
</LinearLayout>
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:background="@color/gray_line"
|
android:layout_marginBottom="20dp"/>
|
|
<!-- Sensitivity Row -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical"
|
android:layout_marginBottom="25dp">
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="灵敏度"
|
android:textColor="@color/base_text"
|
android:textSize="15sp"
|
android:textStyle="bold"
|
android:layout_marginBottom="10dp"/>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
|
<Spinner
|
android:id="@+id/sp_sensitivity_mode"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1.5"
|
android:entries="@array/sensitivity_modes"
|
android:background="@drawable/bg_input_field"
|
android:paddingStart="10dp"
|
android:layout_marginRight="10dp" />
|
|
<EditText
|
android:id="@+id/et_sensitivity_value"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:background="@drawable/bg_input_field"
|
android:gravity="center"
|
android:hint="1-30"
|
android:inputType="number"
|
android:textSize="14sp"/>
|
</LinearLayout>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:layout_marginTop="10dp"
|
android:orientation="horizontal">
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_sensitivity_read"
|
android:layout_width="0dp"
|
android:layout_height="45dp"
|
android:layout_weight="1"
|
android:text="读取"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/base_color"
|
app:qmui_radius="8dp"
|
android:layout_marginRight="10dp"/>
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_sensitivity_write"
|
android:layout_width="0dp"
|
android:layout_height="45dp"
|
android:layout_weight="1"
|
android:text="写入"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/base_color_s"
|
app:qmui_radius="8dp"/>
|
</LinearLayout>
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:background="@color/gray_line"
|
android:layout_marginBottom="20dp"/>
|
|
<!-- Control Buttons -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
|
<TextView
|
android:layout_width="wrap_content"
|
android:layout_height="wrap_content"
|
android:text="操作"
|
android:textColor="@color/base_text"
|
android:textSize="15sp"
|
android:textStyle="bold"
|
android:layout_marginBottom="10dp"/>
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal">
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_reset_mainboard"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:text="主板复位"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/orange"
|
app:qmui_radius="8dp"
|
android:layout_marginRight="10dp"/>
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_reset_sensor"
|
android:layout_width="0dp"
|
android:layout_height="48dp"
|
android:layout_weight="1"
|
android:text="传感复位"
|
android:textColor="@color/white"
|
android:textSize="14sp"
|
app:qmui_backgroundColor="@color/orange"
|
app:qmui_radius="8dp"
|
android:layout_marginLeft="10dp"/>
|
</LinearLayout>
|
</LinearLayout>
|
</LinearLayout>
|
|
<!-- Log Display -->
|
<androidx.cardview.widget.CardView
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
app:cardCornerRadius="12dp"
|
app:cardElevation="2dp"
|
app:cardBackgroundColor="@color/white"
|
android:layout_marginTop="16dp"
|
android:layout_marginBottom="24dp">
|
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="vertical">
|
|
<!-- Card Header -->
|
<LinearLayout
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:orientation="horizontal"
|
android:gravity="center_vertical"
|
android:padding="16dp"
|
android:background="#FAFAFA">
|
|
<View
|
android:layout_width="4dp"
|
android:layout_height="16dp"
|
android:background="@color/base_color"
|
android:layout_marginEnd="8dp"/>
|
|
<TextView
|
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
android:layout_weight="1"
|
android:text="日志"
|
android:textSize="16sp"
|
android:textStyle="bold"
|
android:textColor="#333333" />
|
|
<com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
|
android:id="@+id/btn_clear_log"
|
android:layout_width="wrap_content"
|
android:layout_height="28dp"
|
android:text="清空"
|
android:textColor="@color/white"
|
android:textSize="12sp"
|
android:paddingStart="12dp"
|
android:paddingEnd="12dp"
|
app:qmui_backgroundColor="#FF5252"
|
app:qmui_radius="4dp"/>
|
</LinearLayout>
|
|
<View
|
android:layout_width="match_parent"
|
android:layout_height="1dp"
|
android:background="#EEEEEE"/>
|
|
<ScrollView
|
android:id="@+id/sv_log"
|
android:layout_width="match_parent"
|
android:layout_height="200dp"
|
android:padding="12dp"
|
android:scrollbars="vertical"
|
android:background="#FAFAFA">
|
|
<TextView
|
android:id="@+id/tv_log"
|
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
android:text="日志记录:\n"
|
android:textSize="12sp"
|
android:fontFamily="monospace"
|
android:textColor="#333333"
|
android:lineSpacingExtra="4dp"/>
|
</ScrollView>
|
</LinearLayout>
|
</androidx.cardview.widget.CardView>
|
|
</LinearLayout>
|
</ScrollView>
|
</LinearLayout>
|