docs: 更新 CLAUDE.md 文档记录双击切换壁纸功能
- 在核心功能列表中添加"双击桌面切换壁纸" - 在壁纸更换触发条件中添加双击切换说明 - 在代码修改指南中添加双击功能实现示例 - 提供完整的实现参考流程 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37eb2fda7c
commit
29af9d367e
1 file changed
+9
-1
@@ -11,6 +11,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
- 相册管理系统(支持多相册)
|
||||
- 定时自动更换壁纸
|
||||
- 返回桌面时更换壁纸
|
||||
- 双击桌面切换壁纸
|
||||
- 壁纸历史记录
|
||||
- 顺序/随机播放模式
|
||||
|
||||
@@ -107,9 +108,10 @@ cn.hugh.bz.gk2/
|
||||
- **防重复加载**:使用 `isLoadingWallpaper` 标志防止并发加载
|
||||
|
||||
**壁纸更换触发条件**:
|
||||
1. **强制更换**(`forceChangeNext`):用户手动点击"立即更换"
|
||||
1. **强制更换**(`forceChangeNext`):用户手动点击"立即更换"或双击桌面
|
||||
2. **定时更换**(`scheduledNext`):通过 `AlarmScheduler` 定时触发
|
||||
3. **返回桌面更换**(`changeOnReturnToHome`):壁纸可见时自动更换
|
||||
4. **双击切换**:在桌面双击触发快速切换(可在设置中开关)
|
||||
|
||||
**媒体来源**:
|
||||
- 从文件夹扫描(通过 `MediaScanner`)
|
||||
@@ -294,6 +296,12 @@ adb shell tail -f /sdcard/Android/data/cn.hugh.bz.gk2/files/wallpaper_log.txt
|
||||
2. 在 `AutoWallpaperService.WallpaperEngine.drawWallpaper()` 中添加判断逻辑
|
||||
3. 更新 UI 以允许用户配置该选项
|
||||
|
||||
**示例:双击切换壁纸功能**(已实现):
|
||||
- 在 `AppConfig` 中添加 `doubleTapEnabled` 字段
|
||||
- 在 `WallpaperEngine` 中重写 `onTouchEvent()` 方法
|
||||
- 在 `SettingsFragment` 中添加开关控件
|
||||
- 在 `WallpaperPreferences` 中添加持久化逻辑
|
||||
|
||||
### 添加新的播放模式
|
||||
|
||||
1. 在 `PlayMode` 枚举中添加新模式
|
||||
|
||||
Reference in new issue
Block a user