refactor: 将壁纸预览整合到主页,采用沉浸式设计并简化应用结构
- 删除独立的"当前壁纸"页面(CurrentWallpaperFragment) - 将壁纸预览功能整合到主页,采用沉浸式卡片设计 - 优化主页布局,添加浮动快速操作按钮 - 简化应用结构,从 5 个页面减少到 4 个页面 - 优化历史记录页面,添加"跳转相册"功能 - 更新底部导航栏,移除独立的壁纸导航项 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7139e4d1fd
commit
f78695077a
12 files changed
+627
-962
No files matched your search
@@ -41,7 +41,7 @@
|
||||
android:paddingEnd="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 主页 -->
|
||||
<!-- 主页 (仪表盘) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navHome"
|
||||
android:layout_width="0dp"
|
||||
@@ -73,38 +73,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 壁纸 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navWallpaper"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/selector_nav_item_bg"
|
||||
android:layout_marginEnd="4dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavWallpaper"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_image"
|
||||
app:tint="@color/selector_nav_item_icon_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavWallpaper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="壁纸"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/selector_nav_item_text_color"
|
||||
android:layout_marginTop="2dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 相册 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navAlbum"
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_primary_modern">
|
||||
|
||||
<!-- 顶部标题 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前壁纸"
|
||||
android:textSize="@dimen/text_size_xl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:layout_marginStart="@dimen/spacing_lg"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!-- 壁纸预览卡片 (占据主要空间) -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardWallpaper"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="@dimen/spacing_lg"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/bg_secondary_modern"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvTitle"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/infoContainer">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivWallpaper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="当前壁纸预览" />
|
||||
|
||||
<!-- 点击提示遮罩 -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:id="@+id/touchOverlay" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 底部信息和操作区 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/infoContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/spacing_lg"
|
||||
android:paddingBottom="100dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<!-- 壁纸信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginBottom="@dimen/spacing_lg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWallpaperName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Loading..."
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/icon_size_xs"
|
||||
android:layout_height="@dimen/icon_size_xs"
|
||||
android:src="@drawable/ic_image"
|
||||
app:tint="@color/text_secondary_modern" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvResolution"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1080 x 1920"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginStart="4dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="12dp"
|
||||
android:background="@color/text_hint_modern"
|
||||
android:layout_marginHorizontal="8dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFileSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2.5 MB"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary_modern" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPath"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="/storage/emulated/0/..."
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint_modern"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="middle"
|
||||
android:background="@drawable/badge_background"
|
||||
android:backgroundTint="@color/bg_secondary_modern"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作按钮行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnOpenGallery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:text="查看原图"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconTint="@color/text_primary_modern"
|
||||
app:backgroundTint="@color/bg_secondary_modern"
|
||||
app:cornerRadius="@dimen/corner_radius_pill"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_marginEnd="@dimen/spacing_sm" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnNext"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1.5"
|
||||
android:text="切换下一张"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_arrow_forward"
|
||||
app:iconGravity="textEnd"
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
app:cornerRadius="@dimen/corner_radius_pill"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
android:layout_marginStart="@dimen/spacing_sm" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,221 +1,288 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"
|
||||
android:fillViewport="true">
|
||||
android:background="@color/bg_primary">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/spacing_lg"
|
||||
android:paddingTop="@dimen/spacing_lg"
|
||||
android:paddingBottom="100dp"
|
||||
android:clipToPadding="false">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- Header -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/text_size_xl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginBottom="@dimen/spacing_lg" />
|
||||
|
||||
<!-- 状态仪表盘 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp">
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="80dp">
|
||||
|
||||
<!-- Top Immersive Preview Section -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="420dp">
|
||||
|
||||
<!-- Blurred Background -->
|
||||
<ImageView
|
||||
android:id="@+id/ivBlurBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:alpha="0.4" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_gradient_overlay" />
|
||||
|
||||
<!-- Main Content -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingTop="48dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前正在播放"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:letterSpacing="0.1"
|
||||
android:textAllCaps="true" />
|
||||
|
||||
<!-- Floating Card for Wallpaper -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="360dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="12dp"
|
||||
app:strokeWidth="4dp"
|
||||
app:strokeColor="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCurrentWallpaper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_image" />
|
||||
|
||||
<View
|
||||
android:id="@+id/touchOverlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Floating Quick Actions -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_glass_card"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnChangeNow"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
app:icon="@drawable/ic_refresh"
|
||||
app:iconSize="24dp"
|
||||
app:iconTint="@color/sky_blue_primary"
|
||||
app:backgroundTint="@android:color/transparent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnOpenGallery"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconSize="22dp"
|
||||
app:iconTint="@color/text_primary"
|
||||
app:backgroundTint="@android:color/transparent" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Status Bar Strip -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="-12dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/viewStatusDot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:background="@drawable/status_indicator_enabled" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="服务已开启"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnToggle"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="禁用"
|
||||
android:textColor="@color/accent_primary"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Details Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/spacing_xl">
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 动画容器 -->
|
||||
<FrameLayout
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
android:padding="20dp">
|
||||
<!-- Media Info Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="#E0E0E0"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/statusAnimation"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:lottie_rawRes="@raw/status_active"
|
||||
app:lottie_loop="true"
|
||||
app:lottie_autoPlay="false" />
|
||||
</FrameLayout>
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/status_disabled"
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginTop="@dimen/spacing_md" />
|
||||
<TextView
|
||||
android:id="@+id/tvWallpaperName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="wallpaper_name.jpg"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFolderInfo"
|
||||
android:layout_width="wrap_content"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvResolution"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="1080 x 1920"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" • "
|
||||
android:textColor="@color/text_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFileSize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2.4 MB"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Active Album Card -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="服务未运行"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginTop="@dimen/spacing_xs" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSingleImageInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:visibility="gone" />
|
||||
android:layout_marginTop="12dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="#E0E0E0"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前相册"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="默认相册"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnManageAlbums"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="管理"
|
||||
android:textSize="12sp"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:cornerRadius="18dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp" />
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 控制按钮组 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="@dimen/spacing_lg">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnToggle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="@dimen/spacing_sm"
|
||||
android:text="@string/enable"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_play"
|
||||
app:iconSize="24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_lg"
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
style="@style/Widget.Material3.Button.Icon" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnChangeNow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="72dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
android:text="@string/change_now"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
android:enabled="false"
|
||||
app:icon="@drawable/ic_refresh"
|
||||
app:iconSize="24dp"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_lg"
|
||||
app:backgroundTint="@color/azure_blue_container"
|
||||
app:iconTint="@color/azure_blue_dark"
|
||||
android:textColor="@color/azure_blue_dark"
|
||||
style="@style/Widget.Material3.Button.Icon" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<!-- 当前相册卡片 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="正在播放"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginBottom="@dimen/spacing_sm"
|
||||
android:layout_marginStart="@dimen/spacing_xs" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardAlbum"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_md">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAlbumIcon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_album"
|
||||
app:tint="@color/sky_blue_primary"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="默认相册"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 个文件夹 · 0 张图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnManageAlbums"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="管理"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -1,68 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/background">
|
||||
android:background="@color/bg_primary">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="12dp"
|
||||
android:background="@color/surface">
|
||||
android:background="@android:color/transparent"
|
||||
app:elevation="0dp">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="历史记录"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="回顾您使用过的壁纸"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearHistory"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="清空"
|
||||
android:textColor="@color/status_error_text"
|
||||
app:backgroundTint="@color/status_error_bg"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconTint="@color/status_error_text"
|
||||
app:cornerRadius="20dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="80dp"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="壁纸历史"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearHistory"
|
||||
android:id="@+id/tvEmptyHint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="清空"
|
||||
android:textSize="14sp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="4dp"
|
||||
app:cornerRadius="8dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:textColor="@color/error"
|
||||
app:iconTint="@color/error"
|
||||
app:strokeColor="@color/error" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="暂无历史记录
|
||||
使用后的壁纸会出现在这里"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:gravity="center"
|
||||
android:lineSpacingExtra="4dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 历史记录列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvHistory"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="8dp"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<!-- 空状态提示 -->
|
||||
<TextView
|
||||
android:id="@+id/tvEmptyHint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:text="暂无历史记录\n壁纸使用后会自动记录在这里"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:gravity="center"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -5,76 +5,105 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeWidth="0dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:focusable="true"
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 缩略图 -->
|
||||
<ImageView
|
||||
android:id="@+id/ivThumbnail"
|
||||
<!-- Image Container -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@color/image_placeholder" />
|
||||
android:layout_height="180dp">
|
||||
|
||||
<!-- 信息区域 -->
|
||||
<ImageView
|
||||
android:id="@+id/ivThumbnail"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:background="@color/bg_secondary_modern" />
|
||||
|
||||
<!-- Gradient Overlay for Text Readability -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@drawable/bg_gradient_overlay"
|
||||
android:rotation="180" />
|
||||
|
||||
<!-- Timestamp Badge -->
|
||||
<TextView
|
||||
android:id="@+id/tvTimestamp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="top|end"
|
||||
android:layout_margin="8dp"
|
||||
android:background="@drawable/bg_glass_card"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:text="14:30"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Info Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<!-- 相册名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="相册名称"
|
||||
android:textSize="14sp"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:drawableStart="@drawable/ic_album"
|
||||
android:drawablePadding="4dp" />
|
||||
android:ellipsize="end" />
|
||||
|
||||
<!-- 时间戳 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTimestamp"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="01-15 14:30"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:layout_marginTop="4dp"
|
||||
android:drawableStart="@drawable/ic_schedule"
|
||||
android:drawablePadding="4dp" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="36dp"
|
||||
android:text="删除"
|
||||
android:textSize="12sp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="4dp"
|
||||
app:cornerRadius="6dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:textColor="@color/error"
|
||||
app:iconTint="@color/error"
|
||||
app:strokeColor="@color/error" />
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- Reuse/Jump Button -->
|
||||
<TextView
|
||||
android:id="@+id/btnReuse"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="跳转相册"
|
||||
android:textSize="11sp"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- Delete Button -->
|
||||
<ImageView
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_delete"
|
||||
app:tint="@color/text_hint"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -3,30 +3,17 @@
|
||||
<item
|
||||
android:id="@+id/nav_home"
|
||||
android:icon="@drawable/ic_home"
|
||||
android:title="@string/nav_home"
|
||||
android:orderInCategory="0" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_wallpaper"
|
||||
android:icon="@drawable/ic_image"
|
||||
android:title="@string/nav_wallpaper"
|
||||
android:orderInCategory="1" />
|
||||
|
||||
android:title="首页" />
|
||||
<item
|
||||
android:id="@+id/nav_albums"
|
||||
android:icon="@drawable/ic_album"
|
||||
android:title="@string/nav_albums"
|
||||
android:orderInCategory="2" />
|
||||
|
||||
android:title="相册" />
|
||||
<item
|
||||
android:id="@+id/nav_history"
|
||||
android:icon="@drawable/ic_history"
|
||||
android:title="@string/nav_history"
|
||||
android:orderInCategory="3" />
|
||||
|
||||
android:title="历史" />
|
||||
<item
|
||||
android:id="@+id/nav_settings"
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:title="@string/nav_settings"
|
||||
android:orderInCategory="4" />
|
||||
</menu>
|
||||
android:title="设置" />
|
||||
</menu>
|
||||
Reference in new issue
Block a user