feat: 任务管理模块 - 列表+详情+抢单/打卡/完成
新增: - TaskListFragment 分段控件+RecyclerView+下拉刷新 - TaskDetailFragment 信息展示+底部固定操作按钮(foot-btn) - TaskListAdapter 任务卡片适配器 - TaskItem/TaskDetail 数据类 - TaskApi 新增5个接口(pageList/detail/grab/assign/complete) - 分段控件/底部按钮/状态标签 drawable 修改: - nav_main.xml 添加参数和action - HomeFragment 快捷区点击→任务列表(传tableStatus) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,66 +4,60 @@
|
||||
android:id="@+id/nav_main"
|
||||
app:startDestination="@id/splashFragment">
|
||||
|
||||
<!-- 启动分发页(检查绑定状态 → Home 或 Bind) -->
|
||||
<!-- 启动分发页 -->
|
||||
<fragment
|
||||
android:id="@+id/splashFragment"
|
||||
android:name="com.xiaoqu.watch.ui.common.SplashFragment"
|
||||
android:label="启动">
|
||||
|
||||
<!-- splash → home(已绑定) -->
|
||||
<action
|
||||
android:id="@+id/action_splash_to_home"
|
||||
<action android:id="@+id/action_splash_to_home"
|
||||
app:destination="@id/homeFragment"
|
||||
app:popUpTo="@id/splashFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<!-- splash → bind(未绑定) -->
|
||||
<action
|
||||
android:id="@+id/action_splash_to_bind"
|
||||
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
|
||||
<action android:id="@+id/action_splash_to_bind"
|
||||
app:destination="@id/bindFragment"
|
||||
app:popUpTo="@id/splashFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
app:popUpTo="@id/splashFragment" app:popUpToInclusive="true" />
|
||||
</fragment>
|
||||
|
||||
<!-- 首页(含 ViewPager2 左右滑动:设置页 / 主页) -->
|
||||
<!-- 首页 -->
|
||||
<fragment
|
||||
android:id="@+id/homeFragment"
|
||||
android:name="com.xiaoqu.watch.ui.home.HomeFragment"
|
||||
android:label="首页">
|
||||
|
||||
<!-- home → bind(解绑后) -->
|
||||
<action
|
||||
android:id="@+id/action_home_to_bind"
|
||||
<action android:id="@+id/action_home_to_bind"
|
||||
app:destination="@id/bindFragment"
|
||||
app:popUpTo="@id/homeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
app:popUpTo="@id/homeFragment" app:popUpToInclusive="true" />
|
||||
<!-- 首页 → 任务列表 -->
|
||||
<action android:id="@+id/action_home_to_taskList"
|
||||
app:destination="@id/taskListFragment" />
|
||||
</fragment>
|
||||
|
||||
<!-- 设备绑定页(全屏二维码) -->
|
||||
<!-- 设备绑定页 -->
|
||||
<fragment
|
||||
android:id="@+id/bindFragment"
|
||||
android:name="com.xiaoqu.watch.ui.bind.BindFragment"
|
||||
android:label="设备绑定">
|
||||
|
||||
<!-- bind → home(绑定成功后) -->
|
||||
<action
|
||||
android:id="@+id/action_bind_to_home"
|
||||
<action android:id="@+id/action_bind_to_home"
|
||||
app:destination="@id/homeFragment"
|
||||
app:popUpTo="@id/bindFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
app:popUpTo="@id/bindFragment" app:popUpToInclusive="true" />
|
||||
</fragment>
|
||||
|
||||
<!-- 任务列表 -->
|
||||
<!-- 任务列表(接收 tableStatus 参数) -->
|
||||
<fragment
|
||||
android:id="@+id/taskListFragment"
|
||||
android:name="com.xiaoqu.watch.ui.task.TaskListFragment"
|
||||
android:label="任务列表" />
|
||||
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="任务详情" />
|
||||
android:label="任务详情">
|
||||
<argument android:name="taskId" android:defaultValue="0" app:argType="long" />
|
||||
</fragment>
|
||||
|
||||
<!-- 打卡页 -->
|
||||
<fragment
|
||||
|
||||
Reference in New Issue
Block a user