
hughhuangandClaude Sonnet 4.5
1987462338
fix: 修复应用背景图片不生效的问题
问题:用户在设置页面选择背景图片后,主页背景不会更新
解决方案:
1. 在 HomeFragment.onResume() 中重新应用背景图片
2. 改进 BackgroundHelper.applyBackground() 使用异步加载(Glide CustomTarget)
3. 当背景被禁用时自动清除背景(rootView.setBackground(null))
技术细节:
- 使用 Glide 异步加载背景图片,避免阻塞主线程
- 使用 CustomTarget 监听加载完成
- 检查 rootView.isAttachedToWindow() 确保视图仍然有效
- 在 onLoadCleared 时清除背景
现在背景图片会:
- 选择后立即生效(在 Glide 加载完成后)
- 从设置页面返回主页时自动刷新
- 禁用时自动清除
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 15:09:01 +08:00
..
2026-01-25 15:09:01 +08:00
2026-01-25 14:54:47 +08:00
2026-01-20 23:49:38 +08:00