From 7139e4d1fd435fd96b2243c9287d950cda4c891b Mon Sep 17 00:00:00 2001 From: hugh <1012760428@qq.com> Date: Mon, 2 Feb 2026 12:46:37 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=8D=87=E7=BA=A7=20UI=20=E4=B8=BA=20?= =?UTF-8?q?Material=203=20=E8=AE=BE=E8=AE=A1=E8=AF=AD=E8=A8=80=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 采用 CoordinatorLayout + AppBarLayout 架构替代简单的 NestedScrollView, 支持滚动折叠效果,提升用户体验。使用 Material 3 组件(TextInputLayout、 TonalButton)和现代化的颜色系统,改进视觉层次和交互反馈。 主要改进: - 相册编辑器:重构为卡片式分组布局,使用 TextInputLayout 增强输入体验 - 相册管理:添加大标题和描述文本,改进新建按钮样式 - 设置页面:采用折叠工具栏布局,优化内容组织 - 相册卡片:使用 ConstraintLayout 优化布局性能,增强视觉设计 - 统一圆角、阴影、间距等设计规范 Co-Authored-By: Claude Sonnet 4.5 --- .../main/res/layout/activity_album_editor.xml | 640 ++++++------ .../res/layout/fragment_album_management.xml | 103 +- app/src/main/res/layout/fragment_settings.xml | 929 ++++++++++-------- app/src/main/res/layout/item_album_card.xml | 361 ++++--- app/src/main/res/layout/item_folder_card.xml | 147 ++- 5 files changed, 1167 insertions(+), 1013 deletions(-) diff --git a/app/src/main/res/layout/activity_album_editor.xml b/app/src/main/res/layout/activity_album_editor.xml index 36b53bd..2e87251 100644 --- a/app/src/main/res/layout/activity_album_editor.xml +++ b/app/src/main/res/layout/activity_album_editor.xml @@ -1,340 +1,362 @@ - + android:background="@color/bg_primary"> - + android:background="@color/bg_primary" + app:elevation="0dp"> - - + android:layout_height="?attr/actionBarSize"> - + app:tint="@color/text_primary" + android:background="?attr/selectableItemBackgroundBorderless" + android:contentDescription="返回" /> + android:textColor="@color/text_primary" /> + + + + + + + + + + + + + + + + + + + android:textStyle="bold" + android:textColor="@color/accent_primary" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_album_management.xml b/app/src/main/res/layout/fragment_album_management.xml index 981d3d2..8a89772 100644 --- a/app/src/main/res/layout/fragment_album_management.xml +++ b/app/src/main/res/layout/fragment_album_management.xml @@ -1,58 +1,91 @@ - + android:background="@color/bg_primary"> - + android:background="@android:color/transparent" + app:elevation="0dp"> + + + + + + + + + + + + + + + + - - - + android:orientation="vertical" + android:paddingHorizontal="@dimen/spacing_md" + android:paddingBottom="80dp" + android:clipToPadding="false"> + - - - - + - + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index dbbcd5e..3166bb1 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -1,479 +1,534 @@ - + android:background="@color/bg_primary"> - + android:background="@android:color/transparent" + app:elevation="0dp"> - - - - + app:layout_scrollFlags="scroll|exitUntilCollapsed"> + android:paddingHorizontal="24dp" + android:paddingTop="32dp" + android:paddingBottom="16dp"> + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + android:gravity="center_vertical" + android:padding="16dp" + android:background="?attr/selectableItemBackground"> - + + + + + + + + + + + + + + android:gravity="center_vertical" + android:padding="16dp" + android:background="?attr/selectableItemBackground"> - + + + + + + + + + + + + android:gravity="center_vertical" + android:paddingHorizontal="16dp" + android:paddingVertical="12dp" + android:background="?attr/selectableItemBackground"> - + + + + + + + + + + android:gravity="center_vertical" + android:paddingHorizontal="16dp" + android:paddingVertical="12dp" + android:paddingBottom="16dp" + android:background="?attr/selectableItemBackground"> - + - + + + + - - + + + + + + + + + + + + + android:orientation="vertical" + android:padding="16dp"> - + - + + + + + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_album_card.xml b/app/src/main/res/layout/item_album_card.xml index 475db2f..16e5c74 100644 --- a/app/src/main/res/layout/item_album_card.xml +++ b/app/src/main/res/layout/item_album_card.xml @@ -3,201 +3,250 @@ 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:id="@+id/cardAlbum" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="@dimen/spacing_md" - app:cardElevation="0dp" - app:cardCornerRadius="@dimen/corner_radius_lg" + android:layout_marginBottom="12dp" + android:layout_marginHorizontal="4dp" + app:cardElevation="2dp" + app:cardCornerRadius="16dp" app:cardBackgroundColor="@color/white" - app:strokeColor="@color/bg_secondary_modern" - app:strokeWidth="1dp" + app:strokeWidth="0dp" android:clickable="true" - android:focusable="true"> + android:focusable="true" + android:foreground="?android:attr/selectableItemBackground"> - + android:padding="16dp"> - - + + + + + + + + android:layout_marginStart="16dp" + android:layout_marginEnd="8dp" + android:text="相册名称" + android:textSize="18sp" + android:textStyle="bold" + android:textColor="@color/text_primary" + android:maxLines="1" + android:ellipsize="end" + app:layout_constraintStart_toEndOf="@id/iconContainer" + app:layout_constraintTop_toTopOf="@id/iconContainer" + app:layout_constraintEnd_toStartOf="@id/tvCurrentBadge" /> - - - - + + - + + - - - - - - - - - - - + + android:background="#F0F0F0" + android:layout_marginTop="16dp" + app:layout_constraintTop_toBottomOf="@id/iconContainer" /> - + + android:orientation="horizontal" + android:layout_marginTop="12dp" + android:gravity="center_vertical" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/divider" + app:layout_constraintEnd_toStartOf="@id/actionsLayout"> - + - + android:gravity="center_vertical" + android:background="@drawable/bg_nav_item_ripple" + android:paddingHorizontal="8dp" + android:paddingVertical="4dp"> + + + + android:textSize="12sp" + android:textColor="@color/text_hint" /> + + + + + + + android:layout_marginStart="4dp" + android:text="30m" + android:textSize="12sp" + android:textColor="@color/text_hint" /> + + + + + + - - - - - - - - - - - - + android:layout_marginStart="4dp" + android:text="刚刚" + android:textSize="12sp" + android:textColor="@color/text_hint" /> - + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_folder_card.xml b/app/src/main/res/layout/item_folder_card.xml index b167ab6..07a9ece 100644 --- a/app/src/main/res/layout/item_folder_card.xml +++ b/app/src/main/res/layout/item_folder_card.xml @@ -1,99 +1,94 @@ - + android:orientation="horizontal" + android:gravity="center_vertical" + android:background="@drawable/bg_nav_item_ripple" + android:paddingHorizontal="4dp" + android:paddingVertical="8dp"> + + + + + + + + android:layout_weight="1" + android:layout_marginStart="12dp" + android:orientation="vertical"> + + - - - - - - - - - - - - - - - - + android:layout_marginTop="2dp"> + + - - - + android:textColor="@color/text_hint" + android:maxLines="1" + android:ellipsize="start" /> - + + + + \ No newline at end of file