Skip to content

feat: 首页历史记录入口改为工具栏图标,添加预测性返回手势 - #6

Merged
ccc007ccc merged 1 commit into
ccc007ccc:mainfrom
XiaochangXu:feature/history-icon-predictive-back
Jul 8, 2026
Merged

feat: 首页历史记录入口改为工具栏图标,添加预测性返回手势#6
ccc007ccc merged 1 commit into
ccc007ccc:mainfrom
XiaochangXu:feature/history-icon-predictive-back

Conversation

@XiaochangXu

Copy link
Copy Markdown
Contributor

变更内容

1. 首页历史记录入口改造

  • 删除了首页底部整块的历史记录卡片组件 (historyCard)
  • 在右上角工具栏悬浮窗按钮和搜索按钮之间新增历史图标按钮 (historyButton)
  • 调整 disconnectButton 布局约束,从 historyCard 改为依赖 devicesRecyclerView

2. 新增预测性返回手势

  • AndroidManifest.xml 添加 android:enableOnBackInvokedCallback=true
  • 更新 appcompat 至 1.7.0
  • 移除硬编码的冗余旧版本依赖(activity-ktx:1.9.0、core-ktx:1.13.1)

涉及文件(仅功能性代码,共 5 个)

文件 变更
app/src/main/res/drawable/ic_history.xml 新增 - 历史记录矢量图标
app/src/main/res/layout/activity_main.xml 删除 historyCard,添加 historyButton
app/src/main/java/.../MainActivity.kt 绑定 historyButton 点击事件
app/src/main/AndroidManifest.xml 启用预测性返回手势
app/build.gradle.kts 更新依赖版本

删除首页底部的历史记录卡片组件 (historyCard)
在右上角工具栏悬浮窗与搜索图标之间添加历史图标按钮
新增 ic_history.xml 矢量图标资源
启用 Android 14+ 预测性返回手势 (enableOnBackInvokedCallback)
更新 appcompat 至 1.7.0,移除冗余旧版本依赖
调整 disconnectButton 布局约束
@ccc007ccc
ccc007ccc merged commit 21f5d22 into ccc007ccc:main Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants