diff --git a/app/build.gradle b/app/build.gradle
index c3c6656..2ce0dc5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -44,7 +44,7 @@ configurations.all {
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.9.0'
+ implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// Glide for image loading
@@ -56,4 +56,10 @@ dependencies {
// Permissions
implementation 'androidx.core:core:1.12.0'
+
+ // Lottie animations
+ implementation 'com.airbnb.android:lottie:6.3.0'
+
+ // Blur effect for glassmorphism
+ implementation 'jp.wasabeef:blurry:4.0.1'
}
diff --git a/app/src/main/java/cn/hugh/bz/gk2/ui/HomeFragment.java b/app/src/main/java/cn/hugh/bz/gk2/ui/HomeFragment.java
index 248c11a..336392e 100644
--- a/app/src/main/java/cn/hugh/bz/gk2/ui/HomeFragment.java
+++ b/app/src/main/java/cn/hugh/bz/gk2/ui/HomeFragment.java
@@ -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);
}
}
diff --git a/app/src/main/res/drawable/bg_glass_card.xml b/app/src/main/res/drawable/bg_glass_card.xml
new file mode 100644
index 0000000..79a75e2
--- /dev/null
+++ b/app/src/main/res/drawable/bg_glass_card.xml
@@ -0,0 +1,20 @@
+
+
+
+ -
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/bg_gradient_button.xml b/app/src/main/res/drawable/bg_gradient_button.xml
new file mode 100644
index 0000000..bf83654
--- /dev/null
+++ b/app/src/main/res/drawable/bg_gradient_button.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/bg_gradient_overlay.xml b/app/src/main/res/drawable/bg_gradient_overlay.xml
new file mode 100644
index 0000000..1a50adc
--- /dev/null
+++ b/app/src/main/res/drawable/bg_gradient_overlay.xml
@@ -0,0 +1,9 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/bg_status_glow.xml b/app/src/main/res/drawable/bg_status_glow.xml
new file mode 100644
index 0000000..91aa2d7
--- /dev/null
+++ b/app/src/main/res/drawable/bg_status_glow.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_arrow_back.xml b/app/src/main/res/drawable/ic_arrow_back.xml
new file mode 100644
index 0000000..925a3a5
--- /dev/null
+++ b/app/src/main/res/drawable/ic_arrow_back.xml
@@ -0,0 +1,10 @@
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_arrow_forward.xml b/app/src/main/res/drawable/ic_arrow_forward.xml
new file mode 100644
index 0000000..42528a9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_arrow_forward.xml
@@ -0,0 +1,10 @@
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index d052e9d..b9c7b5e 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -5,6 +5,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@color/bg_primary"
tools:context=".ui.MainActivity">
+ android:padding="@dimen/spacing_md">
@@ -36,11 +36,12 @@
android:layout_width="wrap_content"
android:layout_height="48dp"
android:text="+ 新建"
- android:textSize="14sp"
+ android:textSize="@dimen/text_size_sm"
+ android:backgroundTint="@color/accent_primary"
app:icon="@drawable/ic_add"
app:iconGravity="textStart"
- app:cornerRadius="12dp"
- style="@style/Widget.Material3.Button.TonalButton" />
+ app:cornerRadius="@dimen/corner_radius_md"
+ style="@style/Widget.Material3.Button" />
diff --git a/app/src/main/res/layout/fragment_current_wallpaper.xml b/app/src/main/res/layout/fragment_current_wallpaper.xml
index 402cdc8..d3590d0 100644
--- a/app/src/main/res/layout/fragment_current_wallpaper.xml
+++ b/app/src/main/res/layout/fragment_current_wallpaper.xml
@@ -5,71 +5,140 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:background="@color/bg_primary"
android:fillViewport="true">
-
+
+ app:layout_constraintEnd_toEndOf="parent">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ app:layout_constraintEnd_toEndOf="parent">
-
+
-
+
-