feat: UI 现代化重构 - 暗黑奢华风格 + Lottie 动画
实施基于 Lottie + Material 3 的暗黑奢华 + 玻璃拟态风格的现代化界面重构 主要变更: - 配色方案:深邃黑背景 + 皇家紫强调色 + 翡翠绿状态色 - 依赖升级:Lottie 6.3.0 + Material 3 1.11.0 + Blurry 4.0.1 - Lottie 动画:5 个优化的 JSON 动画文件(状态、加载、成功、刷新、空状态) - 玻璃拟态效果:半透明卡片 + 细腻边框 + 圆角设计 - 布局重构:主页、壁纸预览、相册管理、相册卡片全面重构 - 动画逻辑:HomeFragment 集成 Lottie 状态动画 - 设计规范:统一的尺寸系统(dimens.xml)和 Material 3 暗色主题 技术亮点: - 暗色主题让壁纸预览更突出 - 玻璃拟态创造深度和层次感 - Lottie 动画文件 < 50KB,性能优化 - Material 3 原生暗色主题支持 - 向后兼容旧的配色引用 文档:docs/ui-modernization-summary.md
This commit is contained in:
1 parent
2d98e061cd
commit
aa091c047f
22 files changed
+1321
-178
No files matched your search
@@ -15,6 +15,8 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.airbnb.lottie.LottieAnimationView;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hugh.bz.gk2.R;
|
||||
@@ -31,7 +33,7 @@ public class HomeFragment extends Fragment {
|
||||
private static final String TAG = "HomeFragment";
|
||||
|
||||
private TextView tvStatus;
|
||||
private View statusIndicator;
|
||||
private LottieAnimationView statusAnimation;
|
||||
private TextView tvFolderInfo;
|
||||
private TextView tvSingleImageInfo;
|
||||
private Button btnToggle;
|
||||
@@ -67,7 +69,7 @@ public class HomeFragment extends Fragment {
|
||||
|
||||
private void initViews(View view) {
|
||||
tvStatus = view.findViewById(R.id.tvStatus);
|
||||
statusIndicator = view.findViewById(R.id.statusIndicator);
|
||||
statusAnimation = view.findViewById(R.id.statusAnimation);
|
||||
tvFolderInfo = view.findViewById(R.id.tvFolderInfo);
|
||||
tvSingleImageInfo = view.findViewById(R.id.tvSingleImageInfo);
|
||||
btnToggle = view.findViewById(R.id.btnToggle);
|
||||
@@ -211,17 +213,19 @@ public class HomeFragment extends Fragment {
|
||||
tvStatus.setText(R.string.status_enabled);
|
||||
btnToggle.setText(R.string.disable);
|
||||
btnChangeNow.setEnabled(true);
|
||||
// 更新状态指示器
|
||||
if (statusIndicator != null) {
|
||||
statusIndicator.setBackgroundResource(R.drawable.status_indicator_enabled);
|
||||
// 启动 Lottie 动画
|
||||
if (statusAnimation != null) {
|
||||
statusAnimation.setAnimation(R.raw.status_active);
|
||||
statusAnimation.playAnimation();
|
||||
}
|
||||
} else {
|
||||
tvStatus.setText(R.string.status_disabled);
|
||||
btnToggle.setText(R.string.enable);
|
||||
btnChangeNow.setEnabled(false);
|
||||
// 更新状态指示器
|
||||
if (statusIndicator != null) {
|
||||
statusIndicator.setBackgroundResource(R.drawable.status_indicator_disabled);
|
||||
// 停止 Lottie 动画
|
||||
if (statusAnimation != null) {
|
||||
statusAnimation.cancelAnimation();
|
||||
statusAnimation.setProgress(0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user