refactor: 优化底部导航栏交互和样式
改进内容: - 增强导航项选中状态的视觉反馈 - 添加导航项缩放动画效果 - 优化导航容器的选中状态管理 - 改进颜色系统,使用 Material 3 天蓝色主题 - 优化布局尺寸和间距 - 添加导航项背景选择器 - 添加导航项图标颜色选择器 - 添加导航项文字颜色选择器 UI 改进: - 更新 activity_main.xml 布局 - 更新 fragment_home.xml 布局 - 更新 item_album_card.xml 布局 - 优化 colors.xml 颜色定义 - 优化 dimens.xml 尺寸定义 - 优化 themes.xml 主题定义 - 新增 selector_nav_item_bg.xml - 新增 selector_nav_item_icon_color.xml - 新增 selector_nav_item_text_color.xml Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
11bbeaf6eb
commit
4347fa92b2
11 files changed
+639
-849
No files matched your search
@@ -43,6 +43,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private ViewPager2 viewPager;
|
||||
private LinearLayout bottomNav;
|
||||
private LinearLayout[] navContainers;
|
||||
private TextView[] navItems;
|
||||
private ImageView[] navIcons;
|
||||
private ViewPagerAdapter adapter;
|
||||
@@ -161,16 +162,18 @@ public class MainActivity extends AppCompatActivity {
|
||||
};
|
||||
|
||||
// 初始化导航项和图标数组
|
||||
navContainers = new LinearLayout[5];
|
||||
navItems = new TextView[5];
|
||||
navIcons = new ImageView[5];
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
navContainers[i] = findViewById(navContainerIds[i]);
|
||||
navItems[i] = findViewById(navTextIds[i]);
|
||||
navIcons[i] = findViewById(navIconIds[i]);
|
||||
|
||||
final int position = i;
|
||||
// 使用容器 LinearLayout 设置点击监听器
|
||||
findViewById(navContainerIds[i]).setOnClickListener(v -> {
|
||||
navContainers[i].setOnClickListener(v -> {
|
||||
viewPager.setCurrentItem(position, false);
|
||||
updateNavSelection(position);
|
||||
});
|
||||
@@ -183,8 +186,16 @@ public class MainActivity extends AppCompatActivity {
|
||||
private void updateNavSelection(int position) {
|
||||
for (int i = 0; i < navItems.length; i++) {
|
||||
boolean isSelected = (i == position);
|
||||
navContainers[i].setSelected(isSelected); // 更新容器选中状态
|
||||
navItems[i].setSelected(isSelected);
|
||||
navIcons[i].setSelected(isSelected);
|
||||
|
||||
// 可选:添加简单的缩放动画
|
||||
if (isSelected) {
|
||||
navContainers[i].animate().scaleX(1.05f).scaleY(1.05f).setDuration(150).start();
|
||||
} else {
|
||||
navContainers[i].animate().scaleX(1.0f).scaleY(1.0f).setDuration(150).start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/nav_item_active" />
|
||||
<item android:color="@color/nav_item_inactive" />
|
||||
</selector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true" android:color="@color/nav_item_active" />
|
||||
<item android:color="@color/nav_item_inactive" />
|
||||
</selector>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Selected State: Blue Pill -->
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/nav_item_active_bg" />
|
||||
<corners android:radius="@dimen/corner_radius_pill" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- Default State: Transparent -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@android:color/transparent" />
|
||||
<corners android:radius="@dimen/corner_radius_pill" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -13,173 +13,194 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottomNav"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottomNavCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomNav"
|
||||
<!-- 悬浮导航栏容器 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/bottomNavCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_bottom_nav_glass"
|
||||
android:elevation="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardBackgroundColor="@color/nav_bar_bg"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<!-- 主页 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navHome"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
android:id="@+id/bottomNav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavHome"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_home"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
<!-- 主页 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navHome"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavHome"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="主页"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:layout_marginTop="4dp" />
|
||||
<ImageView
|
||||
android:id="@+id/ivNavHome"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_home"
|
||||
app:tint="@color/selector_nav_item_icon_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavHome"
|
||||
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/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"
|
||||
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/ivNavAlbum"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_album"
|
||||
app:tint="@color/selector_nav_item_icon_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavAlbum"
|
||||
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/navHistory"
|
||||
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/ivNavHistory"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_history"
|
||||
app:tint="@color/selector_nav_item_icon_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavHistory"
|
||||
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/navSettings"
|
||||
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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavSettings"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/selector_nav_item_icon_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavSettings"
|
||||
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>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 壁纸 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navWallpaper"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavWallpaper"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_image"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavWallpaper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="壁纸"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 相册 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navAlbum"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavAlbum"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_album"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavAlbum"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="相册"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 历史 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navHistory"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavHistory"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_history"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavHistory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="历史"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 设置 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/navSettings"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNavSettings"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_settings"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNavSettings"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设置"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:layout_marginTop="4dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -5,159 +5,188 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_primary"
|
||||
android:background="@android:color/transparent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:paddingHorizontal="@dimen/spacing_lg"
|
||||
android:paddingTop="@dimen/spacing_lg"
|
||||
android:paddingBottom="100dp"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<!-- 顶部状态卡片 - 玻璃拟态风格 -->
|
||||
<!-- 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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="12dp"
|
||||
android:layout_marginBottom="@dimen/spacing_lg"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/spacing_xl">
|
||||
|
||||
<!-- Lottie 动画(增强尺寸) -->
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/statusAnimation"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
app:lottie_rawRes="@raw/status_active"
|
||||
app:lottie_loop="true"
|
||||
app:lottie_autoPlay="false"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
<!-- 动画容器 -->
|
||||
<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">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/statusAnimation"
|
||||
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>
|
||||
|
||||
<!-- 状态文本 -->
|
||||
<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_xl"
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
app:layout_constraintTop_toBottomOf="@id/statusAnimation"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginTop="@dimen/spacing_md" />
|
||||
|
||||
<!-- 操作按钮组 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnToggle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:layout_marginEnd="@dimen/spacing_sm"
|
||||
android:text="@string/enable"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
app:icon="@drawable/ic_play"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_md"
|
||||
app:iconSize="28dp"
|
||||
app:backgroundTint="@color/accent_primary"
|
||||
app:cornerRadius="@dimen/corner_radius_lg"
|
||||
style="@style/Widget.Material3.Button.Icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvStatus"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnChangeNow" />
|
||||
<TextView
|
||||
android:id="@+id/tvFolderInfo"
|
||||
android:layout_width="wrap_content"
|
||||
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" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnChangeNow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
android:layout_marginTop="@dimen/spacing_lg"
|
||||
android:text="@string/change_now"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:enabled="false"
|
||||
app:icon="@drawable/ic_refresh"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_md"
|
||||
app:iconSize="28dp"
|
||||
app:strokeColor="@color/accent_primary"
|
||||
app:strokeWidth="2dp"
|
||||
app:cornerRadius="@dimen/corner_radius_lg"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton.Icon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvStatus"
|
||||
app:layout_constraintStart_toEndOf="@id/btnToggle"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</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>
|
||||
|
||||
<!-- 当前相册卡片 -->
|
||||
<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"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:strokeWidth="1dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="@drawable/bg_nav_item_ripple">
|
||||
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_lg">
|
||||
android:padding="@dimen/spacing_md">
|
||||
|
||||
<!-- 相册图标(浅蓝色圆形背景) -->
|
||||
<ImageView
|
||||
android:id="@+id/ivAlbumIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_album"
|
||||
android:tint="@color/sky_blue_primary"
|
||||
app:tint="@color/sky_blue_primary"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:padding="14dp"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!-- 相册信息 -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumLabel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前相册"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
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_lg"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:textColor="@color/text_primary_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumLabel"
|
||||
app:layout_constraintTop_toTopOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
|
||||
<TextView
|
||||
@@ -166,28 +195,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0 个文件夹 · 0 张图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumName"
|
||||
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="48dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="管理"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_sm"
|
||||
app:cornerRadius="@dimen/corner_radius_md"
|
||||
app:strokeColor="@color/accent_secondary"
|
||||
app:strokeWidth="1dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
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" />
|
||||
@@ -196,53 +216,6 @@
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 相册详细信息卡片 - 玻璃拟态风格 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_lg">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="相册详情"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginBottom="@dimen/spacing_sm" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvFolderInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="未选择文件夹或图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSingleImageInfo"
|
||||
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_marginTop="@dimen/spacing_sm" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
@@ -6,11 +6,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
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:cardElevation="0dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
@@ -18,139 +18,174 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/card_padding">
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
<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_gravity="center"
|
||||
android:src="@drawable/ic_album"
|
||||
app:tint="@color/sky_blue_primary" />
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="相册名称"
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
android:orientation="vertical"
|
||||
android:layout_marginStart="@dimen/spacing_md">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
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:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3 个文件夹 · 120 张图片"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_secondary_modern"
|
||||
android:layout_marginTop="2dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/white"
|
||||
android:paddingStart="@dimen/spacing_sm"
|
||||
android:paddingEnd="@dimen/spacing_sm"
|
||||
android:paddingTop="@dimen/spacing_xs"
|
||||
android:paddingBottom="@dimen/spacing_xs"
|
||||
android:text="使用中"
|
||||
android:textSize="10sp"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp"
|
||||
android:background="@drawable/badge_background"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 相册信息 -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
<!-- Divider -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3 个文件夹 · 120 张图片"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textColor="@color/text_secondary"
|
||||
android:layout_marginTop="@dimen/spacing_sm" />
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/bg_secondary_modern"
|
||||
android:layout_marginVertical="@dimen/spacing_md" />
|
||||
|
||||
<!-- 配置信息 -->
|
||||
<!-- Bottom Row: Config and Actions -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_sm"
|
||||
android:orientation="horizontal">
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPlayMode"
|
||||
android:layout_width="wrap_content"
|
||||
<!-- Config Info -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="顺序"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint"
|
||||
android:drawableStart="@drawable/ic_repeat"
|
||||
android:drawablePadding="@dimen/spacing_xs" />
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<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"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
android:drawableStart="@drawable/ic_schedule"
|
||||
android:drawablePadding="@dimen/spacing_xs" />
|
||||
<TextView
|
||||
android:id="@+id/tvPlayMode"
|
||||
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:drawableStart="@drawable/ic_repeat"
|
||||
android:drawablePadding="4dp"
|
||||
android:drawableTint="@color/text_hint_modern" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="end">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnEdit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="编辑"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginEnd="@dimen/spacing_sm"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_xs"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
app:strokeColor="@color/accent_secondary"
|
||||
app:strokeWidth="1dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="切换"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:layout_marginEnd="@dimen/spacing_sm"
|
||||
android:backgroundTint="@color/accent_primary"
|
||||
app:icon="@drawable/ic_swap_horiz"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_xs"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:text="删除"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_xs"
|
||||
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" />
|
||||
<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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Action Buttons -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnEdit"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="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" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDelete"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:insetLeft="0dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:iconSize="20dp"
|
||||
app:iconTint="@color/status_error_text"
|
||||
app:cornerRadius="20dp"
|
||||
app:backgroundTint="@color/status_error_bg"
|
||||
style="@style/Widget.Material3.Button.IconButton" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
@@ -1,112 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- ============================================================ -->
|
||||
<!-- 天蓝色主题色系 (Sky Blue Theme) -->
|
||||
<!-- Modern Friendly Theme - "Fresh Air" Palette -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- 天蓝色主题色 -->
|
||||
<color name="sky_blue_primary">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
<color name="sky_blue_light">#FF5DADE2</color> <!-- 浅天蓝 -->
|
||||
<color name="sky_blue_dark">#FF3498DB</color> <!-- 深天蓝 -->
|
||||
<!-- Primary Brand Colors (Blue) -->
|
||||
<color name="sky_blue_primary">#3B82F6</color> <!-- Blue 500: Vivid, friendly blue -->
|
||||
<color name="sky_blue_light">#60A5FA</color> <!-- Blue 400 -->
|
||||
<color name="sky_blue_dark">#2563EB</color> <!-- Blue 600 -->
|
||||
|
||||
<!-- 蔚蓝色辅助色 -->
|
||||
<color name="azure_blue_secondary">#FF5DADE2</color> <!-- 蔚蓝 -->
|
||||
<color name="azure_blue_light">#FF85C1E2</color> <!-- 浅蔚蓝 -->
|
||||
<color name="azure_blue_dark">#FF2E86C1</color> <!-- 深蔚蓝 -->
|
||||
<!-- Secondary Accents (Indigo/Purple for depth) -->
|
||||
<color name="azure_blue_secondary">#6366F1</color> <!-- Indigo 500 -->
|
||||
<color name="azure_blue_light">#818CF8</color> <!-- Indigo 400 -->
|
||||
<color name="azure_blue_dark">#4F46E5</color> <!-- Indigo 600 -->
|
||||
|
||||
<!-- 渐变色(天蓝系) -->
|
||||
<color name="gradient_sky_start">#FFAED6F1</color> <!-- 浅蓝 -->
|
||||
<color name="gradient_sky_end">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
<!-- Gradients -->
|
||||
<color name="gradient_sky_start">#93C5FD</color> <!-- Blue 300 -->
|
||||
<color name="gradient_sky_end">#3B82F6</color> <!-- Blue 500 -->
|
||||
|
||||
<!-- Material 3 容器色 -->
|
||||
<color name="sky_blue_container">#FFD6EAF8</color> <!-- 浅蓝容器 -->
|
||||
<color name="on_sky_blue_container">#FF15569B</color> <!-- 容器上的文本 -->
|
||||
<color name="azure_blue_container">#FFD0E8F2</color> <!-- 蔚蓝容器 -->
|
||||
<color name="on_azure_blue_container">#FF154360</color> <!-- 蔚蓝容器上的文本 -->
|
||||
<!-- Containers (Soft backgrounds for active states) -->
|
||||
<color name="sky_blue_container">#EFF6FF</color> <!-- Blue 50 -->
|
||||
<color name="on_sky_blue_container">#1E40AF</color> <!-- Blue 800 -->
|
||||
<color name="azure_blue_container">#EEF2FF</color> <!-- Indigo 50 -->
|
||||
<color name="on_azure_blue_container">#312E81</color> <!-- Indigo 900 -->
|
||||
|
||||
<!-- 增强的玻璃拟态效果(浅彩色半透明) -->
|
||||
<color name="glass_bg_sky">#4D4A90E2</color> <!-- 30% 天蓝色半透明 -->
|
||||
<color name="glass_border_sky">#264A90E2</color> <!-- 15% 天蓝色边框 -->
|
||||
<color name="glass_highlight">#1AFFFFFF</color> <!-- 10% 白色高光 -->
|
||||
<!-- Glassmorphism (Refined) -->
|
||||
<color name="glass_bg_sky">#CCEFF6FF</color> <!-- 80% Blue 50 -->
|
||||
<color name="glass_border_sky">#403B82F6</color> <!-- 25% Blue 500 -->
|
||||
<color name="glass_highlight">#80FFFFFF</color> <!-- 50% White -->
|
||||
|
||||
<!-- 语义化状态色 -->
|
||||
<color name="status_success_bg">#FFD5F5E3</color> <!-- 薄荷绿背景 -->
|
||||
<color name="status_success_text">#FF27AE60</color> <!-- 薄荷绿文本 -->
|
||||
<color name="status_error_bg">#FFFADBD8</color> <!-- 珊瑚红背景 -->
|
||||
<color name="status_error_text">#FFE74C3C</color> <!-- 珊瑚红文本 -->
|
||||
<color name="status_warning_bg">#FFFFF3CD</color> <!-- 琥珀黄背景 -->
|
||||
<color name="status_warning_text">#FFF39C12</color> <!-- 琥珀黄文本 -->
|
||||
<!-- Semantic Status Colors -->
|
||||
<color name="status_success_bg">#DCFCE7</color> <!-- Green 100 -->
|
||||
<color name="status_success_text">#15803D</color> <!-- Green 700 -->
|
||||
<color name="status_error_bg">#FEE2E2</color> <!-- Red 100 -->
|
||||
<color name="status_error_text">#B91C1C</color> <!-- Red 700 -->
|
||||
<color name="status_warning_bg">#FEF3C7</color> <!-- Amber 100 -->
|
||||
<color name="status_warning_text">#B45309</color> <!-- Amber 700 -->
|
||||
|
||||
<!-- 现代科技风格文本色 -->
|
||||
<color name="text_primary_modern">#FF2C3E50</color> <!-- 深灰(非纯黑) -->
|
||||
<color name="text_secondary_modern">#FF7F8C8D</color> <!-- 中灰 -->
|
||||
<color name="text_hint_modern">#FFBDC3C7</color> <!-- 浅灰 -->
|
||||
<!-- Modern Text Colors (Slate) -->
|
||||
<color name="text_primary_modern">#1E293B</color> <!-- Slate 800 -->
|
||||
<color name="text_secondary_modern">#64748B</color> <!-- Slate 500 -->
|
||||
<color name="text_hint_modern">#94A3B8</color> <!-- Slate 400 -->
|
||||
|
||||
<!-- 背景色(清新的浅色系) -->
|
||||
<color name="bg_primary_modern">#FFFFFFFF</color> <!-- 纯白 -->
|
||||
<color name="bg_secondary_modern">#FFF0F8FF</color> <!-- AliceBlue 极浅蓝 -->
|
||||
<!-- Backgrounds -->
|
||||
<color name="bg_primary_modern">#F8FAFC</color> <!-- Slate 50 (Very subtle off-white) -->
|
||||
<color name="bg_secondary_modern">#F1F5F9</color> <!-- Slate 100 -->
|
||||
|
||||
<!-- Navigation -->
|
||||
<color name="nav_bar_bg">#FFFFFF</color>
|
||||
<color name="nav_item_inactive">#94A3B8</color> <!-- Slate 400 -->
|
||||
<color name="nav_item_active">#3B82F6</color> <!-- Blue 500 -->
|
||||
<color name="nav_item_active_bg">#EFF6FF</color> <!-- Blue 50 -->
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Legacy colors (keep for compatibility) -->
|
||||
<!-- Legacy/Mapped Colors (Maintained for Compatibility) -->
|
||||
<!-- ============================================================ -->
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
|
||||
<!-- Light Luxury Theme - Background Colors (保留别名) -->
|
||||
<color name="bg_primary">#FFFFFFFF</color> <!-- 纯白 -->
|
||||
<color name="bg_secondary">#FFF0F8FF</color> <!-- AliceBlue 极浅蓝 -->
|
||||
<color name="bg_card">#FFFFFFFF</color> <!-- 白色卡片 -->
|
||||
|
||||
<!-- Light Luxury Theme - Accent Colors (使用天蓝色系) -->
|
||||
<color name="accent_primary">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
<color name="accent_secondary">#FF5DADE2</color><!-- 蔚蓝 -->
|
||||
<color name="gradient_start">#FFAED6F1</color> <!-- 浅蓝 -->
|
||||
<color name="gradient_end">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
|
||||
<!-- Light Luxury Theme - Status Colors -->
|
||||
<color name="status_active">#FF10B981</color> <!-- 翡翠绿 -->
|
||||
<color name="status_inactive">#FF9CA3AF</color> <!-- 银灰 -->
|
||||
<color name="color_error">#FFE74C3C</color> <!-- 珊瑚红 -->
|
||||
|
||||
<!-- Light Luxury Theme - Text Colors (使用现代科技风格) -->
|
||||
<color name="text_primary">#FF2C3E50</color> <!-- 深灰 -->
|
||||
<color name="text_secondary">#FF7F8C8D</color> <!-- 中灰 -->
|
||||
<color name="text_hint">#FFBDC3C7</color> <!-- 浅灰 -->
|
||||
|
||||
<!-- Light Luxury Theme - Glass Effect (增强版) -->
|
||||
<color name="glass_bg">#33000000</color> <!-- 20% 黑色 -->
|
||||
<color name="glass_border">#1A000000</color> <!-- 10% 黑色 -->
|
||||
<color name="glass_bg_enhanced">#E6FFFFFF</color> <!-- 浅色半透明背景 -->
|
||||
<color name="glass_border_enhanced">#1A4A90E2</color> <!-- 浅蓝色边框 -->
|
||||
|
||||
<!-- Legacy theme colors (mapped to new theme) -->
|
||||
<color name="primary">@color/accent_primary</color>
|
||||
<color name="primary_dark">@color/gradient_start</color>
|
||||
<color name="accent">@color/accent_secondary</color>
|
||||
|
||||
<!-- Legacy background and text colors (mapped to new theme) -->
|
||||
<color name="background">@color/bg_primary</color>
|
||||
|
||||
<!-- Base Colors -->
|
||||
<color name="primary">@color/sky_blue_primary</color>
|
||||
<color name="primary_dark">@color/sky_blue_dark</color>
|
||||
<color name="accent">@color/azure_blue_secondary</color>
|
||||
<color name="background">@color/bg_primary_modern</color>
|
||||
<color name="surface">@color/bg_card</color>
|
||||
<color name="error">@color/color_error</color>
|
||||
|
||||
<color name="purple_200">@color/azure_blue_light</color>
|
||||
<color name="purple_500">@color/azure_blue_secondary</color>
|
||||
<color name="purple_700">@color/azure_blue_dark</color>
|
||||
<color name="teal_200">#2DD4BF</color>
|
||||
<color name="teal_700">#0F766E</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
|
||||
<!-- Legacy status colors (mapped to new theme) -->
|
||||
<!-- App Main Backgrounds -->
|
||||
<color name="bg_primary">@color/bg_primary_modern</color>
|
||||
<color name="bg_secondary">@color/bg_secondary_modern</color>
|
||||
<color name="bg_card">#FFFFFF</color>
|
||||
|
||||
<!-- App Accents -->
|
||||
<color name="accent_primary">@color/sky_blue_primary</color>
|
||||
<color name="accent_secondary">@color/azure_blue_secondary</color>
|
||||
<color name="gradient_start">@color/gradient_sky_start</color>
|
||||
<color name="gradient_end">@color/gradient_sky_end</color>
|
||||
|
||||
<!-- Status -->
|
||||
<color name="status_enabled">@color/status_active</color>
|
||||
<color name="status_disabled">@color/status_inactive</color>
|
||||
<color name="status_active">#10B981</color> <!-- Emerald 500 -->
|
||||
<color name="status_inactive">#94A3B8</color> <!-- Slate 400 -->
|
||||
<color name="color_error">#EF4444</color> <!-- Red 500 -->
|
||||
|
||||
<!-- Legacy functional colors (mapped to new theme) -->
|
||||
<color name="error">@color/color_error</color>
|
||||
<color name="success">@color/status_active</color>
|
||||
<!-- Text -->
|
||||
<color name="text_primary">@color/text_primary_modern</color>
|
||||
<color name="text_secondary">@color/text_secondary_modern</color>
|
||||
<color name="text_hint">@color/text_hint_modern</color>
|
||||
|
||||
<!-- Legacy card colors (mapped to new theme) -->
|
||||
<!-- Glass Styles (Legacy Mapped) -->
|
||||
<color name="glass_bg">@color/glass_bg_sky</color>
|
||||
<color name="glass_border">@color/glass_border_sky</color>
|
||||
<color name="glass_bg_enhanced">#E6FFFFFF</color> <!-- 90% White -->
|
||||
<color name="glass_border_enhanced">#1A3B82F6</color> <!-- 10% Primary -->
|
||||
|
||||
<!-- Placeholder -->
|
||||
<color name="image_placeholder">@color/bg_secondary_modern</color>
|
||||
|
||||
<!-- Card Specific -->
|
||||
<color name="card_background">@color/bg_card</color>
|
||||
<color name="card_stroke">@color/glass_border</color>
|
||||
<color name="image_placeholder">@color/bg_secondary</color>
|
||||
<color name="card_stroke">@color/bg_secondary_modern</color>
|
||||
|
||||
<!-- Launcher icon colors -->
|
||||
<color name="ic_launcher_background">#FF6200EE</color>
|
||||
<color name="ic_launcher_foreground">#FFFFFFFF</color>
|
||||
</resources>
|
||||
<!-- Launcher -->
|
||||
<color name="ic_launcher_background">@color/sky_blue_primary</color>
|
||||
<color name="ic_launcher_foreground">#FFFFFF</color>
|
||||
</resources>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Spacing -->
|
||||
<dimen name="spacing_xxs">2dp</dimen>
|
||||
<dimen name="spacing_xs">4dp</dimen>
|
||||
<dimen name="spacing_sm">8dp</dimen>
|
||||
<dimen name="spacing_md">16dp</dimen>
|
||||
@@ -13,16 +14,20 @@
|
||||
<dimen name="corner_radius_md">16dp</dimen>
|
||||
<dimen name="corner_radius_lg">24dp</dimen>
|
||||
<dimen name="corner_radius_xl">32dp</dimen>
|
||||
<dimen name="corner_radius_pill">100dp</dimen>
|
||||
|
||||
<!-- Card -->
|
||||
<dimen name="card_elevation">8dp</dimen>
|
||||
<dimen name="card_padding">16dp</dimen>
|
||||
<dimen name="card_elevation">0dp</dimen>
|
||||
<dimen name="card_elevation_hover">8dp</dimen>
|
||||
<dimen name="card_padding">20dp</dimen>
|
||||
|
||||
<!-- Button -->
|
||||
<dimen name="button_height">56dp</dimen>
|
||||
<dimen name="button_corner_radius">16dp</dimen>
|
||||
<dimen name="button_height_sm">40dp</dimen>
|
||||
<dimen name="button_corner_radius">@dimen/corner_radius_pill</dimen>
|
||||
|
||||
<!-- Icon -->
|
||||
<dimen name="icon_size_xs">16dp</dimen>
|
||||
<dimen name="icon_size_sm">24dp</dimen>
|
||||
<dimen name="icon_size_md">32dp</dimen>
|
||||
<dimen name="icon_size_lg">48dp</dimen>
|
||||
@@ -35,6 +40,7 @@
|
||||
<dimen name="text_size_lg">20sp</dimen>
|
||||
<dimen name="text_size_xl">24sp</dimen>
|
||||
<dimen name="text_size_xxl">32sp</dimen>
|
||||
<dimen name="text_size_display">40sp</dimen>
|
||||
|
||||
<!-- Glass Effect -->
|
||||
<dimen name="glass_blur_radius">25dp</dimen>
|
||||
@@ -43,6 +49,10 @@
|
||||
<!-- Album Card -->
|
||||
<dimen name="album_card_height">200dp</dimen>
|
||||
<dimen name="album_thumbnail_size">120dp</dimen>
|
||||
|
||||
<!-- Navigation -->
|
||||
<dimen name="nav_bar_height">80dp</dimen>
|
||||
<dimen name="nav_item_icon_size">24dp</dimen>
|
||||
|
||||
<!-- Wallpaper Preview -->
|
||||
<dimen name="wallpaper_preview_height">400dp</dimen>
|
||||
@@ -50,4 +60,4 @@
|
||||
<!-- History Grid -->
|
||||
<dimen name="history_grid_spacing">8dp</dimen>
|
||||
<dimen name="history_item_height">180dp</dimen>
|
||||
</resources>
|
||||
</resources>
|
||||
@@ -1,42 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Material 3 天蓝色主题 -->
|
||||
<!-- Material 3 Modern Friendly Theme -->
|
||||
<style name="Theme.BzForGk2" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Material 3 Primary(天蓝色系) -->
|
||||
<!-- Primary Brand Colors -->
|
||||
<item name="colorPrimary">@color/sky_blue_primary</item>
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<item name="colorPrimaryContainer">@color/sky_blue_container</item>
|
||||
<item name="colorOnPrimaryContainer">@color/on_sky_blue_container</item>
|
||||
|
||||
<!-- Material 3 Secondary(蔚蓝色系) -->
|
||||
<!-- Secondary Brand Colors -->
|
||||
<item name="colorSecondary">@color/azure_blue_secondary</item>
|
||||
<item name="colorOnSecondary">@color/white</item>
|
||||
<item name="colorSecondaryContainer">@color/azure_blue_container</item>
|
||||
<item name="colorOnSecondaryContainer">@color/on_azure_blue_container</item>
|
||||
|
||||
<!-- Material 3 Tertiary(可选第三色) -->
|
||||
<item name="colorTertiary">@color/sky_blue_dark</item>
|
||||
<item name="colorOnTertiary">@color/white</item>
|
||||
|
||||
<!-- Material 3 Background & Surface -->
|
||||
<item name="android:colorBackground">@color/bg_primary</item>
|
||||
<item name="colorOnBackground">@color/text_primary</item>
|
||||
<!-- Background & Surface -->
|
||||
<item name="android:colorBackground">@color/bg_primary_modern</item>
|
||||
<item name="colorOnBackground">@color/text_primary_modern</item>
|
||||
<item name="colorSurface">@color/bg_card</item>
|
||||
<item name="colorOnSurface">@color/text_primary</item>
|
||||
<item name="colorSurfaceVariant">@color/bg_secondary</item>
|
||||
<item name="colorOnSurfaceVariant">@color/text_secondary</item>
|
||||
<item name="colorOnSurface">@color/text_primary_modern</item>
|
||||
<item name="colorSurfaceVariant">@color/bg_secondary_modern</item>
|
||||
<item name="colorOnSurfaceVariant">@color/text_secondary_modern</item>
|
||||
|
||||
<!-- Material 3 Error -->
|
||||
<!-- Status Bar -->
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
|
||||
<!-- Navigation Bar -->
|
||||
<item name="android:navigationBarColor">@color/nav_bar_bg</item>
|
||||
<item name="android:windowLightNavigationBar">true</item>
|
||||
|
||||
<!-- Shape -->
|
||||
<item name="shapeAppearanceSmallComponent">@style/ShapeAppearance.App.Small</item>
|
||||
<item name="shapeAppearanceMediumComponent">@style/ShapeAppearance.App.Medium</item>
|
||||
<item name="shapeAppearanceLargeComponent">@style/ShapeAppearance.App.Large</item>
|
||||
|
||||
<!-- Legacy Compatibility -->
|
||||
<item name="colorError">@color/color_error</item>
|
||||
<item name="colorOnError">@color/white</item>
|
||||
<item name="colorErrorContainer">@color/status_error_bg</item>
|
||||
<item name="colorOnErrorContainer">@color/status_error_text</item>
|
||||
|
||||
<!-- Material 3 状态层颜色 -->
|
||||
<item name="colorPrimaryInverse">@color/sky_blue_light</item>
|
||||
|
||||
<!-- 保留旧版别名(向后兼容) -->
|
||||
<item name="colorPrimaryDark">@color/sky_blue_dark</item>
|
||||
<item name="colorAccent">@color/azure_blue_secondary</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
<!-- Shape Styles -->
|
||||
<style name="ShapeAppearance.App.Small" parent="ShapeAppearance.Material3.SmallComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/corner_radius_sm</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.App.Medium" parent="ShapeAppearance.Material3.MediumComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/corner_radius_md</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearance.App.Large" parent="ShapeAppearance.Material3.LargeComponent">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">@dimen/corner_radius_lg</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in new issue
Block a user