style: 升级 UI 为 Material 3 设计语言并优化布局架构
采用 CoordinatorLayout + AppBarLayout 架构替代简单的 NestedScrollView, 支持滚动折叠效果,提升用户体验。使用 Material 3 组件(TextInputLayout、 TonalButton)和现代化的颜色系统,改进视觉层次和交互反馈。 主要改进: - 相册编辑器:重构为卡片式分组布局,使用 TextInputLayout 增强输入体验 - 相册管理:添加大标题和描述文本,改进新建按钮样式 - 设置页面:采用折叠工具栏布局,优化内容组织 - 相册卡片:使用 ConstraintLayout 优化布局性能,增强视觉设计 - 统一圆角、阴影、间距等设计规范 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a7635d459
commit
7139e4d1fd
5 files changed
+1167
-1013
No files matched your search
@@ -1,58 +1,91 @@
|
||||
<?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="@color/bg_primary"
|
||||
android:fillViewport="true">
|
||||
android:background="@color/bg_primary">
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_md">
|
||||
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="@dimen/spacing_lg"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="@dimen/spacing_md">
|
||||
|
||||
<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.appbar.CollapsingToolbarLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="相册管理"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="@dimen/spacing_md"
|
||||
android:paddingBottom="80dp"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- Create New Button (Full Width) -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnCreateAlbum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:text="新建"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:backgroundTint="@color/accent_primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:text="新建相册"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_md"
|
||||
app:cornerRadius="28dp"
|
||||
app:backgroundTint="@color/accent_primary"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 相册列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvAlbums"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
tools:listitem="@layout/item_album_card" />
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvAlbums"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:nestedScrollingEnabled="false"
|
||||
tools:listitem="@layout/item_album_card" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
Reference in new issue
Block a user