feat: 完善壁纸应用功能并优化性能
## 主要功能改进 ### 1. 修复壁纸引擎架构 - 将 WallpaperEngine 合并到 AutoWallpaperService 作为内部类 - 修复 WallpaperService.Engine 继承问题 - 修正 Paint 类导入,使用 android.graphics.Paint ### 2. 支持现代 Android 存储框架 - ImageLoader 支持 content:// URI 格式加载图片 - ImageScanner 支持 DocumentFile API 访问 SAF 文件夹 - 保留传统 File API 兼容性 - 持久化 URI 权限 ### 3. 添加文件夹管理功能 - 新增文件夹列表展示,支持查看图片数量 - 实现文件夹移除功能,带确认对话框 - 使用 ViewHolder 模式优化列表性能 - 缓存图片数量,避免重复扫描 ### 4. 优化用户体验 - 每次启用都弹出壁纸设置引导 - 添加进度条显示加载状态 - 首次启动显示使用指南 - 异步扫描文件夹,避免阻塞主线程 ### 5. 资源文件完善 - 添加应用图标(自适应图标和传统图标) - 创建应用主题 themes.xml - 添加文件夹列表项布局 item_folder.xml - 完善颜色资源定义 ### 6. 性能优化 - 异步扫描大文件夹,避免卡顿 - 优先使用缓存数据,加快启动速度 - 异步加载图片数量统计 - ViewHolder 复用减少 findViewById 调用 ### 7. 修复编译问题 - 解决 Kotlin stdlib 依赖冲突 - 修复 TextView 导入错误 - 移除有问题的 WallpaperEngine 独立类 ## 技术改进 - 使用 DocumentFile.fromTreeUri() 处理 SAF 文件夹 - ContentResolver.openInputStream() 加载 URI 图片 - 异步任务优化 UI 响应 - 智能缓存策略减少 I/O 操作 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
390d417f5b
commit
d304297f2c
16 files changed
+759
-226
No files matched your search
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
Reference in new issue
Block a user