feat: 首页与应用壳模块
新增: - StatusBarView 自定义状态栏(圆点+信号条+电池壳,按原型图V3) - ViewPager2 左右滑动(设置页/主页,默认主页) - 主页:时钟+日期+快捷区3卡片(对接statisticsNew API) - 设置页:圆形头像+用户信息+设备信息+调试模式 - TaskApi 接口(统计+考勤) - HomePagerAdapter(View方式,避免Fragment嵌套) - 页面指示器+快捷区卡片背景drawable 修改: - HomeFragment 重写为ViewPager2容器 - NetworkModule 添加TaskApi提供者 - styles.xml 添加ConfigRow/Label/Value样式 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,67 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 首页布局:NavBar + 硬件验证 demo -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<!-- 首页容器:ViewPager2 左右滑动(设置页 / 主页) -->
|
||||
<FrameLayout 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">
|
||||
android:background="@color/background">
|
||||
|
||||
<!-- 顶部导航栏 -->
|
||||
<include layout="@layout/layout_nav_bar" />
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<ScrollView
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="@dimen/safe_area_left"
|
||||
android:paddingEnd="@dimen/safe_area_right"
|
||||
android:paddingBottom="@dimen/safe_area_bottom">
|
||||
|
||||
<!-- 系统状态信息 -->
|
||||
<TextView
|
||||
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_sm" />
|
||||
|
||||
<!-- 屏幕控制测试 -->
|
||||
<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.Grey"
|
||||
android:text="提示弹窗测试"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
Reference in New Issue
Block a user