feat: 系统控制模块 - 硬件抽象层
新增: - ScreenController 屏幕控制接口 + FiseScreenController 实现(ROM广播) - NfcController NFC控制接口 + FiseNfcController 实现(sysfs读写) - VibrationController 振动接口 + FiseVibrationController 实现(13种方案+音频) - SystemStateMonitor 系统状态监听(电量、蓝牙状态广播) - DeviceModule Hilt硬件抽象绑定 - 8个音频文件(res/raw/) - AppEvent 新增4个系统状态事件 修改: - MainActivity 注册 SystemStateMonitor - HomeFragment 硬件验证demo(熄屏/振动/NFC/电量实时显示) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 首页布局:NavBar + 内容区 -->
|
||||
<!-- 首页布局:NavBar + 硬件验证 demo -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/background"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 顶部导航栏(首页模式:状态图标 + 时间 + 电量) -->
|
||||
<!-- 顶部导航栏 -->
|
||||
<include layout="@layout/layout_nav_bar" />
|
||||
|
||||
<!-- 内容区域 -->
|
||||
@@ -22,71 +22,44 @@
|
||||
android:paddingEnd="@dimen/safe_area_right"
|
||||
android:paddingBottom="@dimen/safe_area_bottom">
|
||||
|
||||
<!-- demo 信息展示 -->
|
||||
<!-- 系统状态信息 -->
|
||||
<TextView
|
||||
android:id="@+id/tvDemoInfo"
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="@dimen/text_small"
|
||||
android:lineSpacingExtra="3dp"
|
||||
android:layout_marginBottom="@dimen/spacing_md" />
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 按钮 demo:触发 QuTipDialog -->
|
||||
<!-- 屏幕控制测试 -->
|
||||
<TextView
|
||||
android:id="@+id/btnScreenOff"
|
||||
style="@style/ActionButton.Warning"
|
||||
android:text="熄屏测试(3秒后亮屏)"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 振动测试 -->
|
||||
<TextView
|
||||
android:id="@+id/btnVibrate"
|
||||
style="@style/ActionButton.Primary"
|
||||
android:text="振动测试"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- NFC 测试 -->
|
||||
<TextView
|
||||
android:id="@+id/btnNfcScan"
|
||||
style="@style/ActionButton.Success"
|
||||
android:text="NFC 读卡测试"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 弹窗测试 -->
|
||||
<TextView
|
||||
android:id="@+id/btnShowTip"
|
||||
style="@style/ActionButton.Primary"
|
||||
android:text="显示提示弹窗"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 按钮 demo:触发 QuConfirmDialog -->
|
||||
<TextView
|
||||
android:id="@+id/btnShowConfirm"
|
||||
style="@style/ActionButton.Success"
|
||||
android:text="显示确认弹窗"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 按钮 demo:其他样式展示 -->
|
||||
<TextView
|
||||
android:id="@+id/btnDanger"
|
||||
style="@style/ActionButton.Danger"
|
||||
android:text="危险按钮"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnWarning"
|
||||
style="@style/ActionButton.Warning"
|
||||
android:text="警告按钮"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btnGrey"
|
||||
style="@style/ActionButton.Grey"
|
||||
android:text="灰色按钮"
|
||||
android:text="提示弹窗测试"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<!-- 半宽按钮并排 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/ActionButton.Grey"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="取消"
|
||||
android:layout_marginEnd="@dimen/spacing_sm" />
|
||||
|
||||
<TextView
|
||||
style="@style/ActionButton.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="确定" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
Reference in New Issue
Block a user