采用 CoordinatorLayout + AppBarLayout 架构替代简单的 NestedScrollView, 支持滚动折叠效果,提升用户体验。使用 Material 3 组件(TextInputLayout、 TonalButton)和现代化的颜色系统,改进视觉层次和交互反馈。 主要改进: - 相册编辑器:重构为卡片式分组布局,使用 TextInputLayout 增强输入体验 - 相册管理:添加大标题和描述文本,改进新建按钮样式 - 设置页面:采用折叠工具栏布局,优化内容组织 - 相册卡片:使用 ConstraintLayout 优化布局性能,增强视觉设计 - 统一圆角、阴影、间距等设计规范 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
91 lines
3.7 KiB
XML
91 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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">
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
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: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="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="28dp"
|
|
app:backgroundTint="@color/accent_primary"
|
|
style="@style/Widget.Material3.Button" />
|
|
|
|
<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.coordinatorlayout.widget.CoordinatorLayout> |