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
+868
-714
No files matched your search
@@ -1,102 +1,111 @@
|
||||
<?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/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="vertical"
|
||||
android:padding="16dp">
|
||||
android:background="@color/bg_primary"
|
||||
app:elevation="0dp">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="horizontal">
|
||||
android:layout_height="?attr/actionBarSize">
|
||||
|
||||
<ImageButton
|
||||
<ImageView
|
||||
android:id="@+id/btnBack"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_back"
|
||||
android:contentDescription="返回"
|
||||
app:tint="@color/text_primary" />
|
||||
app:tint="@color/text_primary"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="返回" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvTitle"
|
||||
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"
|
||||
android:layout_marginStart="8dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="保存"
|
||||
android:textSize="14sp"
|
||||
app:cornerRadius="8dp"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 相册名称 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="相册名称"
|
||||
android:textSize="16sp"
|
||||
android:layout_gravity="center"
|
||||
android:text="编辑相册"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<EditText
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSave"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="保存"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
</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:padding="16dp"
|
||||
android:paddingBottom="40dp">
|
||||
|
||||
<!-- Album Name Input -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="相册名称"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCornerRadiusTopStart="12dp"
|
||||
app:boxCornerRadiusTopEnd="12dp"
|
||||
app:boxCornerRadiusBottomStart="12dp"
|
||||
app:boxCornerRadiusBottomEnd="12dp"
|
||||
app:boxStrokeColor="@color/accent_primary"
|
||||
app:hintTextColor="@color/accent_primary"
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etAlbumName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:hint="请输入相册名称"
|
||||
android:inputType="text"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColorHint="@color/text_hint"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_marginTop="8dp" />
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="text" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<!-- Media Sources Section -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="媒体来源"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<!-- 文件夹选择 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="#E0E0E0"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -104,6 +113,7 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Folders Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -121,16 +131,19 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnAddFolder"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="+ 添加"
|
||||
android:text="添加"
|
||||
android:textSize="12sp"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="4dp"
|
||||
app:cornerRadius="8dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
app:iconSize="16dp"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
app:cornerRadius="18dp"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:iconTint="@color/sky_blue_primary"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@@ -141,24 +154,13 @@
|
||||
android:nestedScrollingEnabled="false"
|
||||
tools:listitem="@layout/item_folder_card" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 单张图片选择 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
android:layout_marginVertical="16dp" />
|
||||
|
||||
<!-- Individual Images Header -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -169,44 +171,59 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="单张图片"
|
||||
android:text="精选媒体"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnAddImage"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="+ 添加"
|
||||
android:text="添加"
|
||||
android:textSize="12sp"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="4dp"
|
||||
app:cornerRadius="8dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
app:iconSize="16dp"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
app:cornerRadius="18dp"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:iconTint="@color/sky_blue_primary"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvImages"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
tools:listitem="@layout/item_folder_card" />
|
||||
tools:listitem="@layout/item_media" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 播放模式 -->
|
||||
<!-- Playback Settings Section -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:text="播放设置"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="#E0E0E0"
|
||||
app:cardBackgroundColor="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -214,20 +231,21 @@
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Play Mode -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="播放模式"
|
||||
android:textSize="16sp"
|
||||
android:text="播放顺序"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="12dp" />
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgPlayMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbSequential"
|
||||
@@ -249,32 +267,38 @@
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 更换间隔 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
android:layout_marginVertical="16dp" />
|
||||
|
||||
<!-- Interval -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更换间隔"
|
||||
android:textSize="16sp"
|
||||
android:layout_weight="1"
|
||||
android:text="自动更换间隔"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIntervalValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30 分钟"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBarInterval"
|
||||
android:layout_width="match_parent"
|
||||
@@ -283,47 +307,43 @@
|
||||
android:max="180"
|
||||
android:progress="30" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvIntervalValue"
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30 分钟"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="8dp"
|
||||
android:gravity="center" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 返回桌面更换 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
android:layout_marginVertical="16dp" />
|
||||
|
||||
<!-- Change on Return -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="返回桌面时更换壁纸"
|
||||
android:textSize="16sp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="返回桌面时更换"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每次回到桌面都自动切换"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchChangeOnReturn"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -337,4 +357,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -1,51 +1,82 @@
|
||||
<?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">
|
||||
|
||||
<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:padding="@dimen/spacing_md">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
android:orientation="horizontal">
|
||||
android:paddingHorizontal="@dimen/spacing_lg"
|
||||
android:paddingTop="32dp"
|
||||
android:paddingBottom="@dimen/spacing_md">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="相册管理"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnCreateAlbum"
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:text="新建"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:backgroundTint="@color/accent_primary"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_md"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
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"
|
||||
@@ -55,4 +86,6 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -1,479 +1,534 @@
|
||||
<?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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/spacing_md"
|
||||
tools:context=".ui.SettingsFragment">
|
||||
android:background="@android:color/transparent"
|
||||
app:elevation="0dp">
|
||||
|
||||
<!-- 背景图片设置卡片 -->
|
||||
<TextView
|
||||
android:id="@+id/tvBackgroundLabel"
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="应用背景"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardBackground"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvBackgroundLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
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">
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchBackground"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="启用背景图片"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSelectBackground"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="选择图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 透明度滑块 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="背景透明度"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="@dimen/spacing_md" />
|
||||
android:text="设置"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBarBackgroundAlpha"
|
||||
<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:max="100"
|
||||
android:min="5"
|
||||
android:progress="30"
|
||||
android:layout_marginTop="@dimen/spacing_sm" />
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="80dp">
|
||||
|
||||
<!-- Section: Playback & Interaction -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="播放与交互"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Double Tap -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<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="16sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="在桌面空白处双击快速切换"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchDoubleTapEnabled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<View android:layout_width="match_parent" android:layout_height="1dp" android:background="#F0F0F0" android:layout_marginHorizontal="16dp"/>
|
||||
|
||||
<!-- Video Enable -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<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="16sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:text="允许播放视频格式的壁纸"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchVideoEnabled"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Video Sub-settings (Mute) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<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="14sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchVideoMuted"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Video Sub-settings (Battery) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<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="14sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="节省电量,仅在充电时播放"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
</LinearLayout>
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchVideoPauseOnBattery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<!-- Section: Fixed Wallpaper -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="固定壁纸 (收藏)"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardFixedWallpaper"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="四指点击桌面即可快速打开此壁纸"
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginBottom="12dp" />
|
||||
|
||||
<!-- Preview Area -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
app:cardCornerRadius="12dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardBackgroundColor="@color/bg_secondary">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFixedWallpaperPreview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="固定壁纸预览" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Actions -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSelectFixedWallpaper"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="选择图片"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:iconTint="@color/sky_blue_primary" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearFixedWallpaper"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="清除"
|
||||
android:textColor="@color/status_error_text" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<!-- Section: App Appearance -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="应用外观"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="启用自定义背景"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/switchBackground"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="背景透明度"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBackgroundAlpha"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30%"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_hint"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:layout_gravity="end" />
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent_primary" />
|
||||
</LinearLayout>
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBarBackgroundAlpha"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:min="5"
|
||||
android:progress="30" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSelectBackground"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="更换背景"
|
||||
app:strokeColor="@color/sky_blue_primary"
|
||||
android:textColor="@color/sky_blue_primary" />
|
||||
|
||||
<!-- 清除按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearBackground"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="清除背景图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:textColor="@color/color_error"
|
||||
app:iconTint="@color/color_error"
|
||||
app:strokeColor="@color/color_error" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 视频设置卡片 -->
|
||||
<TextView
|
||||
android:id="@+id/tvVideoSettingsLabel"
|
||||
style="@style/Widget.Material3.Button.TextButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="视频设置"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardBackground"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardVideoSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvVideoSettingsLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
|
||||
<!-- 启用视频壁纸 -->
|
||||
<Switch
|
||||
android:id="@+id/switchVideoEnabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启用视频壁纸"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="允许使用视频文件作为动态壁纸"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginBottom="@dimen/spacing_md" />
|
||||
|
||||
<!-- 视频静音 -->
|
||||
<Switch
|
||||
android:id="@+id/switchVideoMuted"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="视频静音"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="播放视频时自动静音"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginBottom="@dimen/spacing_md" />
|
||||
|
||||
<!-- 电池供电时暂停 -->
|
||||
<Switch
|
||||
android:id="@+id/switchVideoPauseOnBattery"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="电池供电时暂停视频"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="仅在充电时播放视频,节省电量"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="恢复默认"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 双击设置卡片 -->
|
||||
|
||||
<!-- Section: Data -->
|
||||
<TextView
|
||||
android:id="@+id/tvDoubleTapSettingsLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="交互设置"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="维护"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardVideoSettings"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
android:textColor="@color/accent_primary" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardDoubleTapSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvDoubleTapSettingsLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
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="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 启用双击切换 -->
|
||||
<Switch
|
||||
android:id="@+id/switchDoubleTapEnabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="启用双击切换壁纸"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="在桌面双击可快速切换到下一张壁纸"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 固定壁纸设置卡片 -->
|
||||
<TextView
|
||||
android:id="@+id/tvFixedWallpaperLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="固定壁纸"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardDoubleTapSettings"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardFixedWallpaper"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFixedWallpaperLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
|
||||
<!-- 选择固定壁纸按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSelectFixedWallpaper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="选择固定壁纸"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
app:icon="@drawable/ic_image"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
<!-- 固定壁纸预览 -->
|
||||
<ImageView
|
||||
android:id="@+id/ivFixedWallpaperPreview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="200dp"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:scaleType="centerCrop"
|
||||
android:contentDescription="固定壁纸预览"
|
||||
android:background="@color/bg_secondary" />
|
||||
|
||||
<!-- 清除固定壁纸按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnClearFixedWallpaper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="清除固定壁纸"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:textColor="@color/color_error"
|
||||
app:iconTint="@color/color_error"
|
||||
app:strokeColor="@color/color_error"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 提示信息 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:text="提示:固定壁纸是一个收藏功能。四指点击桌面会发送通知,点击通知后可在系统相册中查看固定壁纸,同时会禁用自动更新功能。"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_hint"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 自动扫描设置卡片 -->
|
||||
<TextView
|
||||
android:id="@+id/tvAutoScanLabel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="自动扫描"
|
||||
android:textSize="@dimen/text_size_xxl"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardFixedWallpaper"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/cardAutoScan"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAutoScanLabel"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
|
||||
<!-- 自动扫描间隔选择 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="自动扫描间隔"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:text="定期清除缓存并重新扫描相册文件夹,确保显示最新内容"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="定期更新相册缓存,确保新文件被发现"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/radioGroupAutoScan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="12dp">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioAutoScanDisabled"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="禁用(手动刷新)"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
android:text="禁用 (手动刷新)"
|
||||
android:paddingVertical="8dp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioAutoScan1Hour"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每 1 小时"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
android:paddingVertical="8dp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioAutoScan6Hours"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每 6 小时"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
android:paddingVertical="8dp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioAutoScan12Hours"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每 12 小时"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
android:paddingVertical="8dp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/radioAutoScan24Hours"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="每 24 小时(推荐)"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textColor="@color/text_primary"
|
||||
android:minHeight="48dp" />
|
||||
android:text="每 24 小时 (推荐)"
|
||||
android:paddingVertical="8dp"
|
||||
android:textColor="@color/text_primary" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<!-- 提示信息 -->
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- Version Info Footer -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:text="注意:自动扫描会在后台定时运行,可能会消耗少量电量。建议选择较长的间隔时间。"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_hint"
|
||||
android:lineSpacingExtra="4dp" />
|
||||
android:layout_marginTop="32dp"
|
||||
android:gravity="center"
|
||||
android:text="v2.0.0 · BzForGk2"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -3,35 +3,33 @@
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_lg">
|
||||
|
||||
<!-- Top Row: Name and Status -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Icon Container -->
|
||||
<FrameLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:id="@+id/iconContainer"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container">
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
@@ -41,163 +39,214 @@
|
||||
app:tint="@color/sky_blue_primary" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/spacing_md">
|
||||
|
||||
<!-- Album Name -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="相册名称"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
android:ellipsize="end"
|
||||
app:layout_constraintStart_toEndOf="@id/iconContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/iconContainer"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvCurrentBadge" />
|
||||
|
||||
<!-- Album Info (Subtitle) -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:text="3 个文件夹 · 120 张图片"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
android:textSize="13sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
app:layout_constraintStart_toStartOf="@id/tvAlbumName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumName"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvCurrentBadge" />
|
||||
|
||||
<!-- Active Badge -->
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="使用中"
|
||||
android:textSize="10sp"
|
||||
android:text="当前使用"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:background="@drawable/badge_background"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iconContainer" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Divider -->
|
||||
<!-- Divider (Optional, subtle) -->
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/bg_secondary_modern"
|
||||
android:layout_marginVertical="@dimen/spacing_md" />
|
||||
android:background="#F0F0F0"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/iconContainer" />
|
||||
|
||||
<!-- Bottom Row: Config and Actions -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- Config Info -->
|
||||
<!-- Bottom Stats Row -->
|
||||
<LinearLayout
|
||||
android:id="@+id/statsRow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
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">
|
||||
|
||||
<!-- Play Mode -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_repeat"
|
||||
app:tint="@color/text_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPlayMode"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="顺序"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint_modern"
|
||||
android:drawableStart="@drawable/ic_repeat"
|
||||
android:drawablePadding="4dp"
|
||||
android:drawableTint="@color/text_hint_modern" />
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Interval -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_schedule"
|
||||
app:tint="@color/text_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvInterval"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="30 分钟"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
android:drawableStart="@drawable/ic_schedule"
|
||||
android:drawablePadding="4dp"
|
||||
android:drawableTint="@color/text_hint_modern" />
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="30m"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Last Scan -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="14dp"
|
||||
android:src="@drawable/ic_refresh"
|
||||
app:tint="@color/text_hint" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLastScanTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="未扫描"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
android:drawableStart="@drawable/ic_refresh"
|
||||
android:drawablePadding="4dp"
|
||||
android:drawableTint="@color/text_hint_modern" />
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="刚刚"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<!-- Actions -->
|
||||
<LinearLayout
|
||||
android:id="@+id/actionsLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/statsRow"
|
||||
app:layout_constraintTop_toTopOf="@id/statsRow">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnEdit"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="0dp"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="20dp"
|
||||
app:iconTint="@color/text_secondary_modern"
|
||||
app:cornerRadius="20dp"
|
||||
app:backgroundTint="@color/bg_secondary_modern"
|
||||
style="@style/Widget.Material3.Button.IconButton" />
|
||||
app:iconSize="18dp"
|
||||
app:iconTint="@color/text_secondary"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:rippleColor="#20000000" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="0dp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="20dp"
|
||||
app:iconSize="18dp"
|
||||
app:iconTint="@color/status_error_text"
|
||||
app:cornerRadius="20dp"
|
||||
app:backgroundTint="@color/status_error_bg"
|
||||
style="@style/Widget.Material3.Button.IconButton" />
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:rippleColor="#20FF0000" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSwitch"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="使用"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
app:cornerRadius="@dimen/corner_radius_pill"
|
||||
app:backgroundTint="@color/sky_blue_primary"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
app:cornerRadius="18dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -1,33 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="12dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 文件夹名称和路径 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="4dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- Icon -->
|
||||
<FrameLayout
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_folder"
|
||||
android:tint="@color/primary"
|
||||
android:contentDescription="文件夹图标" />
|
||||
app:tint="@color/sky_blue_primary" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Text Info -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -40,60 +38,57 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="文件夹名称"
|
||||
android:textSize="16sp"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFolderPath"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="content://..."
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="middle" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 图片数量和操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:layout_marginTop="2dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvImageCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 个文件"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFolderPath"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="0 张图片"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:drawableStart="@drawable/ic_image"
|
||||
android:drawablePadding="4dp" />
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="/storage/..."
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="start" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Remove Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnRemove"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:text="移除"
|
||||
android:textSize="12sp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="4dp"
|
||||
app:cornerRadius="8dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="0dp"
|
||||
app:icon="@drawable/ic_close"
|
||||
app:iconSize="20dp"
|
||||
app:iconTint="@color/text_secondary"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:rippleColor="#20000000" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
Reference in new issue
Block a user