refactor: 全面升级 UI 为 Material 3 天蓝色主题
升级主题系统到 Material Design 3,采用清新的天蓝色配色方案,增强玻璃拟态效果和视觉层次。 主要改进: - 升级主题系统到 Material 3(Theme.Material3.DayNight.NoActionBar) - 配色方案从紫色系更换为天蓝色系(sky_blue_primary, azure_blue_secondary) - 重构底部导航栏,添加图标+文字布局,增强玻璃拟态背景效果 - 优化主页布局,使用 ConstraintLayout,增大动画和按钮尺寸 - 添加深色主题支持(values-night/themes.xml) - 新增玻璃拟态背景、涟漪效果、图标容器等 drawable 资源 技术细节: - 保留所有旧版颜色别名,确保向后兼容 - 底部导航使用 LinearLayout 容器 + ImageView + TextView 组合 - 使用颜色状态列表实现选中状态切换 - 增强卡片阴影(8dp → 12dp)和玻璃拟态效果 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b570f0d34
commit
78209d7706
14 files changed
+491
-3502
No files matched your search
@@ -11,6 +11,7 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -43,6 +44,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
private ViewPager2 viewPager;
|
||||
private LinearLayout bottomNav;
|
||||
private TextView[] navItems;
|
||||
private ImageView[] navIcons;
|
||||
private ViewPagerAdapter adapter;
|
||||
|
||||
// Folder picker launcher
|
||||
@@ -131,19 +133,44 @@ public class MainActivity extends AppCompatActivity {
|
||||
}
|
||||
|
||||
private void setupBottomNav() {
|
||||
// 初始化导航项数组
|
||||
navItems = new TextView[]{
|
||||
findViewById(R.id.navHome),
|
||||
findViewById(R.id.navWallpaper),
|
||||
findViewById(R.id.navAlbum),
|
||||
findViewById(R.id.navHistory),
|
||||
findViewById(R.id.navSettings)
|
||||
// 导航容器 ID(LinearLayout,用于点击事件)
|
||||
int[] navContainerIds = {
|
||||
R.id.navHome,
|
||||
R.id.navWallpaper,
|
||||
R.id.navAlbum,
|
||||
R.id.navHistory,
|
||||
R.id.navSettings
|
||||
};
|
||||
|
||||
// 设置点击监听器
|
||||
for (int i = 0; i < navItems.length; i++) {
|
||||
// 导航文本 ID(TextView,用于更新选中状态)
|
||||
int[] navTextIds = {
|
||||
R.id.tvNavHome,
|
||||
R.id.tvNavWallpaper,
|
||||
R.id.tvNavAlbum,
|
||||
R.id.tvNavHistory,
|
||||
R.id.tvNavSettings
|
||||
};
|
||||
|
||||
// 图标 ID
|
||||
int[] navIconIds = {
|
||||
R.id.ivNavHome,
|
||||
R.id.ivNavWallpaper,
|
||||
R.id.ivNavAlbum,
|
||||
R.id.ivNavHistory,
|
||||
R.id.ivNavSettings
|
||||
};
|
||||
|
||||
// 初始化导航项和图标数组
|
||||
navItems = new TextView[5];
|
||||
navIcons = new ImageView[5];
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
navItems[i] = findViewById(navTextIds[i]);
|
||||
navIcons[i] = findViewById(navIconIds[i]);
|
||||
|
||||
final int position = i;
|
||||
navItems[i].setOnClickListener(v -> {
|
||||
// 使用容器 LinearLayout 设置点击监听器
|
||||
findViewById(navContainerIds[i]).setOnClickListener(v -> {
|
||||
viewPager.setCurrentItem(position, false);
|
||||
updateNavSelection(position);
|
||||
});
|
||||
@@ -155,11 +182,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private void updateNavSelection(int position) {
|
||||
for (int i = 0; i < navItems.length; i++) {
|
||||
if (i == position) {
|
||||
navItems[i].setTextColor(getColor(R.color.accent_primary));
|
||||
} else {
|
||||
navItems[i].setTextColor(getColor(android.R.color.darker_gray));
|
||||
}
|
||||
boolean isSelected = (i == position);
|
||||
navItems[i].setSelected(isSelected);
|
||||
navIcons[i].setSelected(isSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:color="#FF7C3AED" android:state_checked="true" />
|
||||
<item android:color="#FF6B7280" />
|
||||
<!-- 选中状态:天蓝色 -->
|
||||
<item android:color="@color/sky_blue_primary" android:state_selected="true" />
|
||||
<item android:color="@color/sky_blue_primary" android:state_checked="true" />
|
||||
<!-- 未选中状态:中灰色 -->
|
||||
<item android:color="@color/text_secondary" />
|
||||
</selector>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 背景层:浅蓝色半透明 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#E6FFFFFF" />
|
||||
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 边框层:浅蓝色半透明边框 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#1A4A90E2" />
|
||||
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 顶部高光 -->
|
||||
<item android:top="0dp">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#33FFFFFF" />
|
||||
<corners android:topLeftRadius="24dp" android:topRightRadius="24dp" />
|
||||
<size android:height="1dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FFD6EAF8" />
|
||||
<size android:width="56dp" android:height="56dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#1A4A90E2">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -20,73 +20,165 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/bottomNav"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_height="80dp"
|
||||
android:orientation="horizontal"
|
||||
android:background="@android:color/white"
|
||||
android:elevation="8dp"
|
||||
android:background="@drawable/bg_bottom_nav_glass"
|
||||
android:elevation="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<TextView
|
||||
<!-- 主页 -->
|
||||
<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:text="主页"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<TextView
|
||||
<ImageView
|
||||
android:id="@+id/ivNavHome"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_home"
|
||||
android:tint="@color/bottom_nav_color" />
|
||||
|
||||
<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" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 壁纸 -->
|
||||
<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:text="壁纸"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<TextView
|
||||
<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:text="相册"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<TextView
|
||||
<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:text="历史"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
android:focusable="true"
|
||||
android:background="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<TextView
|
||||
<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:text="设置"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/bottom_nav_color"
|
||||
android:clickable="true"
|
||||
android:focusable="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>
|
||||
|
||||
|
||||
@@ -19,89 +19,85 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardElevation="12dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_lg"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width">
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/spacing_lg">
|
||||
android:padding="@dimen/spacing_xl">
|
||||
|
||||
<!-- 状态指示器 - Lottie 动画 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<!-- 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" />
|
||||
|
||||
<!-- 状态文本 -->
|
||||
<TextView
|
||||
android:id="@+id/tvStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingVertical="@dimen/spacing_md">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
android:id="@+id/statusAnimation"
|
||||
android:layout_width="@dimen/icon_size_xl"
|
||||
android:layout_height="@dimen/icon_size_xl"
|
||||
app:lottie_rawRes="@raw/status_active"
|
||||
app:lottie_loop="true"
|
||||
app:lottie_autoPlay="false" />
|
||||
|
||||
<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_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="@dimen/spacing_sm" />
|
||||
|
||||
</LinearLayout>
|
||||
android:text="@string/status_disabled"
|
||||
android:textSize="@dimen/text_size_xl"
|
||||
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" />
|
||||
|
||||
<!-- 操作按钮组 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_md"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
<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" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnToggle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/button_height"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="@dimen/spacing_sm"
|
||||
android:text="@string/enable"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:backgroundTint="@color/accent_primary"
|
||||
app:icon="@drawable/ic_play"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_sm"
|
||||
app:cornerRadius="@dimen/button_corner_radius"
|
||||
style="@style/Widget.Material3.Button" />
|
||||
<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" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnChangeNow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/button_height"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
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_sm"
|
||||
app:cornerRadius="@dimen/button_corner_radius"
|
||||
app:strokeColor="@color/accent_primary"
|
||||
app:strokeWidth="2dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -111,70 +107,92 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width"
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:strokeWidth="1dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:focusable="true"
|
||||
android:foreground="@drawable/bg_nav_item_ripple">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/card_padding"
|
||||
android:gravity="center_vertical">
|
||||
android:padding="@dimen/spacing_lg">
|
||||
|
||||
<LinearLayout
|
||||
<!-- 相册图标(浅蓝色圆形背景) -->
|
||||
<ImageView
|
||||
android:id="@+id/ivAlbumIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:src="@drawable/ic_album"
|
||||
android:tint="@color/sky_blue_primary"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:padding="14dp"
|
||||
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:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
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" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="当前相册"
|
||||
android:textSize="@dimen/text_size_xs"
|
||||
android:textColor="@color/text_hint" />
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="默认相册"
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="@dimen/spacing_xs"
|
||||
android:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumLabel"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="默认相册"
|
||||
android:textSize="@dimen/text_size_lg"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:layout_marginTop="@dimen/spacing_xs" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="wrap_content"
|
||||
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" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="0dp"
|
||||
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:layout_marginStart="@dimen/spacing_md"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAlbumIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumName"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnManageAlbums" />
|
||||
|
||||
<!-- 管理按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnManageAlbums"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="48dp"
|
||||
android:text="管理"
|
||||
android:textSize="@dimen/text_size_sm"
|
||||
android:textSize="@dimen/text_size_md"
|
||||
android:layout_marginStart="@dimen/spacing_sm"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconGravity="textStart"
|
||||
app:iconPadding="@dimen/spacing_xs"
|
||||
app:cornerRadius="@dimen/corner_radius_sm"
|
||||
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.OutlinedButton"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
@@ -183,11 +201,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/spacing_md"
|
||||
app:cardElevation="@dimen/card_elevation"
|
||||
app:cardElevation="8dp"
|
||||
app:cardCornerRadius="@dimen/corner_radius_md"
|
||||
app:cardBackgroundColor="@color/bg_card"
|
||||
app:strokeColor="@color/glass_border"
|
||||
app:strokeWidth="@dimen/glass_border_width">
|
||||
app:cardBackgroundColor="@color/glass_bg_enhanced"
|
||||
app:strokeColor="@color/glass_border_enhanced"
|
||||
app:strokeWidth="1dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Material 3 天蓝色主题 - 深色模式 -->
|
||||
<style name="Theme.BzForGk2" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Material 3 Primary(天蓝色系 - 深色模式) -->
|
||||
<item name="colorPrimary">@color/sky_blue_light</item>
|
||||
<item name="colorOnPrimary">@color/text_primary</item>
|
||||
<item name="colorPrimaryContainer">#FF1E3A5F</item>
|
||||
<item name="colorOnPrimaryContainer">@color/sky_blue_light</item>
|
||||
|
||||
<!-- Material 3 Secondary(蔚蓝色系 - 深色模式) -->
|
||||
<item name="colorSecondary">@color/azure_blue_light</item>
|
||||
<item name="colorOnSecondary">@color/text_primary</item>
|
||||
<item name="colorSecondaryContainer">#FF1E3A5F</item>
|
||||
<item name="colorOnSecondaryContainer">@color/azure_blue_light</item>
|
||||
|
||||
<!-- Material 3 Tertiary -->
|
||||
<item name="colorTertiary">@color/sky_blue_primary</item>
|
||||
<item name="colorOnTertiary">@color/text_primary</item>
|
||||
|
||||
<!-- Material 3 Background & Surface(深色背景) -->
|
||||
<item name="android:colorBackground">#FF121212</item>
|
||||
<item name="colorOnBackground">@color/text_primary_modern</item>
|
||||
<item name="colorSurface">#FF1E1E1E</item>
|
||||
<item name="colorOnSurface">@color/text_primary_modern</item>
|
||||
<item name="colorSurfaceVariant">#FF2C2C2C</item>
|
||||
<item name="colorOnSurfaceVariant">@color/text_secondary_modern</item>
|
||||
|
||||
<!-- Material 3 Error(深色模式) -->
|
||||
<item name="colorError">@color/status_error_text</item>
|
||||
<item name="colorOnError">@color/text_primary</item>
|
||||
<item name="colorErrorContainer">#FF5C2B2B</item>
|
||||
<item name="colorOnErrorContainer">@color/status_error_text</item>
|
||||
|
||||
<!-- Material 3 状态层颜色 -->
|
||||
<item name="colorPrimaryInverse">@color/sky_blue_dark</item>
|
||||
|
||||
<!-- 保留旧版别名(向后兼容) -->
|
||||
<item name="colorPrimaryDark">@color/sky_blue_primary</item>
|
||||
<item name="colorAccent">@color/azure_blue_light</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,6 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- ============================================================ -->
|
||||
<!-- 天蓝色主题色系 (Sky Blue Theme) -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<!-- 天蓝色主题色 -->
|
||||
<color name="sky_blue_primary">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
<color name="sky_blue_light">#FF5DADE2</color> <!-- 浅天蓝 -->
|
||||
<color name="sky_blue_dark">#FF3498DB</color> <!-- 深天蓝 -->
|
||||
|
||||
<!-- 蔚蓝色辅助色 -->
|
||||
<color name="azure_blue_secondary">#FF5DADE2</color> <!-- 蔚蓝 -->
|
||||
<color name="azure_blue_light">#FF85C1E2</color> <!-- 浅蔚蓝 -->
|
||||
<color name="azure_blue_dark">#FF2E86C1</color> <!-- 深蔚蓝 -->
|
||||
|
||||
<!-- 渐变色(天蓝系) -->
|
||||
<color name="gradient_sky_start">#FFAED6F1</color> <!-- 浅蓝 -->
|
||||
<color name="gradient_sky_end">#FF4A90E2</color> <!-- 天蓝 -->
|
||||
|
||||
<!-- 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> <!-- 蔚蓝容器上的文本 -->
|
||||
|
||||
<!-- 增强的玻璃拟态效果(浅彩色半透明) -->
|
||||
<color name="glass_bg_sky">#4D4A90E2</color> <!-- 30% 天蓝色半透明 -->
|
||||
<color name="glass_border_sky">#264A90E2</color> <!-- 15% 天蓝色边框 -->
|
||||
<color name="glass_highlight">#1AFFFFFF</color> <!-- 10% 白色高光 -->
|
||||
|
||||
<!-- 语义化状态色 -->
|
||||
<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> <!-- 琥珀黄文本 -->
|
||||
|
||||
<!-- 现代科技风格文本色 -->
|
||||
<color name="text_primary_modern">#FF2C3E50</color> <!-- 深灰(非纯黑) -->
|
||||
<color name="text_secondary_modern">#FF7F8C8D</color> <!-- 中灰 -->
|
||||
<color name="text_hint_modern">#FFBDC3C7</color> <!-- 浅灰 -->
|
||||
|
||||
<!-- 背景色(清新的浅色系) -->
|
||||
<color name="bg_primary_modern">#FFFFFFFF</color> <!-- 纯白 -->
|
||||
<color name="bg_secondary_modern">#FFF0F8FF</color> <!-- AliceBlue 极浅蓝 -->
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- Legacy colors (keep for compatibility) -->
|
||||
<!-- ============================================================ -->
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
@@ -9,30 +57,32 @@
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
|
||||
<!-- Light Luxury Theme - Background Colors -->
|
||||
<!-- Light Luxury Theme - Background Colors (保留别名) -->
|
||||
<color name="bg_primary">#FFFFFFFF</color> <!-- 纯白 -->
|
||||
<color name="bg_secondary">#FFF5F5F7</color> <!-- 浅灰 -->
|
||||
<color name="bg_secondary">#FFF0F8FF</color> <!-- AliceBlue 极浅蓝 -->
|
||||
<color name="bg_card">#FFFFFFFF</color> <!-- 白色卡片 -->
|
||||
|
||||
<!-- Light Luxury Theme - Accent Colors -->
|
||||
<color name="accent_primary">#FF7C3AED</color> <!-- 深紫 -->
|
||||
<color name="accent_secondary">#FF8B5CF6</color><!-- 皇家紫 -->
|
||||
<color name="gradient_start">#FF6366F1</color> <!-- 靛蓝 -->
|
||||
<color name="gradient_end">#FFA855F7</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">#FFEF4444</color> <!-- 珊瑚红 -->
|
||||
<color name="color_error">#FFE74C3C</color> <!-- 珊瑚红 -->
|
||||
|
||||
<!-- Light Luxury Theme - Text Colors -->
|
||||
<color name="text_primary">#FF111827</color> <!-- 深黑 -->
|
||||
<color name="text_secondary">#FF6B7280</color> <!-- 中灰 -->
|
||||
<color name="text_hint">#FF9CA3AF</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 -->
|
||||
<!-- 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>
|
||||
|
||||
@@ -1,9 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 默认主题 -->
|
||||
<style name="Theme.BzForGk2" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
<item name="colorPrimary">#FF7C3AED</item>
|
||||
<item name="colorPrimaryDark">#FF6366F1</item>
|
||||
<item name="colorAccent">#FF8B5CF6</item>
|
||||
<!-- Material 3 天蓝色主题 -->
|
||||
<style name="Theme.BzForGk2" parent="Theme.Material3.DayNight.NoActionBar">
|
||||
<!-- Material 3 Primary(天蓝色系) -->
|
||||
<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(蔚蓝色系) -->
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<!-- Material 3 Error -->
|
||||
<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>
|
||||
Reference in new issue
Block a user