1987462338fb7d89a76da6b13edf44387cbefed7
问题:用户在设置页面选择背景图片后,主页背景不会更新 解决方案: 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>
Languages
Java
100%