Files
xqwatch/app/src/main/res/navigation/nav_main.xml
T

69 lines
2.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/nav_main"
2026-04-27 16:23:37 +09:30
app:startDestination="@id/splashFragment">
<!-- 启动分发页 -->
2026-04-27 16:23:37 +09:30
<fragment
android:id="@+id/splashFragment"
android:name="com.xiaoqu.watch.ui.common.SplashFragment"
android:label="启动">
<action android:id="@+id/action_splash_to_home"
2026-04-27 16:23:37 +09:30
app:destination="@id/homeFragment"
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
<action android:id="@+id/action_splash_to_bind"
2026-04-27 16:23:37 +09:30
app:destination="@id/bindFragment"
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
2026-04-27 16:23:37 +09:30
</fragment>
<!-- 首页 -->
<fragment
android:id="@+id/homeFragment"
android:name="com.xiaoqu.watch.ui.home.HomeFragment"
2026-04-27 16:23:37 +09:30
android:label="首页">
<action android:id="@+id/action_home_to_bind"
2026-04-27 16:23:37 +09:30
app:destination="@id/bindFragment"
app:popUpTo="@id/homeFragment" app:popUpToInclusive="true" />
<!-- 首页 → 任务列表 -->
<action android:id="@+id/action_home_to_taskList"
app:destination="@id/taskListFragment" />
2026-04-27 16:23:37 +09:30
</fragment>
<!-- 设备绑定页 -->
<fragment
android:id="@+id/bindFragment"
android:name="com.xiaoqu.watch.ui.bind.BindFragment"
2026-04-27 16:23:37 +09:30
android:label="设备绑定">
<action android:id="@+id/action_bind_to_home"
2026-04-27 16:23:37 +09:30
app:destination="@id/homeFragment"
app:popUpTo="@id/bindFragment" app:popUpToInclusive="true" />
2026-04-27 16:23:37 +09:30
</fragment>
<!-- 任务列表(接收 tableStatus 参数) -->
<fragment
android:id="@+id/taskListFragment"
android:name="com.xiaoqu.watch.ui.task.TaskListFragment"
android:label="任务列表">
<argument android:name="tableStatus" android:defaultValue="2" app:argType="integer" />
<!-- 任务列表 → 任务详情 -->
<action android:id="@+id/action_taskList_to_detail"
app:destination="@id/taskDetailFragment" />
</fragment>
<!-- 任务详情(接收 taskId 参数) -->
<fragment
android:id="@+id/taskDetailFragment"
android:name="com.xiaoqu.watch.ui.task.TaskDetailFragment"
android:label="任务详情">
<argument android:name="taskId" android:defaultValue="0L" app:argType="long" />
</fragment>
<!-- 设备信息 -->
<fragment
android:id="@+id/infoFragment"
android:name="com.xiaoqu.watch.ui.info.InfoFragment"
android:label="设备信息" />
</navigation>