style: 更新应用图标和优化相册卡片 UI
- 添加自定义应用图标前景和通知图标 - 简化相册卡片布局结构,移除冗余元素 - 调整卡片样式:圆角、边框、按钮等细节优化 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d5837e76a5
commit
93c78c8fbc
6 files changed
+138
-144
No files matched your search
@@ -1043,7 +1043,7 @@ public class AutoWallpaperService extends WallpaperService {
|
||||
|
||||
// 创建通知
|
||||
NotificationCompat.Builder builder = new NotificationCompat.Builder(AutoWallpaperService.this, channelId)
|
||||
.setSmallIcon(android.R.drawable.ic_menu_gallery)
|
||||
.setSmallIcon(cn.hugh.bz.gk2.R.drawable.ic_notification)
|
||||
.setContentTitle("打开固定壁纸")
|
||||
.setContentText("点击在系统相册中查看固定壁纸")
|
||||
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<!-- Photo Frame/Mountain Icon -->
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||
</vector>
|
||||
@@ -8,10 +8,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_marginHorizontal="4dp"
|
||||
app:cardElevation="2dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:cardCornerRadius="20dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:strokeWidth="0dp"
|
||||
app:strokeWidth="1dp"
|
||||
app:strokeColor="#F0F0F0"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground">
|
||||
@@ -21,42 +22,68 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- Icon Container -->
|
||||
<!-- Album Icon -->
|
||||
<FrameLayout
|
||||
android:id="@+id/iconContainer"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:background="@drawable/bg_icon_container_sky"
|
||||
android:backgroundTint="@color/sky_blue_container"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_album"
|
||||
app:tint="@color/sky_blue_primary" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Album Name -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
<!-- Album Name & Badge Row -->
|
||||
<LinearLayout
|
||||
android:id="@+id/headerRow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="相册名称"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintStart_toEndOf="@id/iconContainer"
|
||||
app:layout_constraintTop_toTopOf="@id/iconContainer"
|
||||
app:layout_constraintEnd_toStartOf="@id/tvCurrentBadge" />
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<!-- Album Info (Subtitle) -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumName"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="相册名称"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
|
||||
<!-- Active Badge -->
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
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="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Media Info Subtitle -->
|
||||
<TextView
|
||||
android:id="@+id/tvAlbumInfo"
|
||||
android:layout_width="0dp"
|
||||
@@ -65,125 +92,68 @@
|
||||
android:text="3 个文件夹 · 120 张图片"
|
||||
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" />
|
||||
app:layout_constraintStart_toStartOf="@id/headerRow"
|
||||
app:layout_constraintTop_toBottomOf="@id/headerRow"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Active Badge -->
|
||||
<TextView
|
||||
android:id="@+id/tvCurrentBadge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
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="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iconContainer" />
|
||||
|
||||
<!-- Divider (Optional, subtle) -->
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#F0F0F0"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/iconContainer" />
|
||||
|
||||
<!-- Bottom Stats Row -->
|
||||
<!-- Stats Row (Cleaned up) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/statsRow"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||
app:layout_constraintEnd_toStartOf="@id/actionsLayout">
|
||||
app:layout_constraintStart_toStartOf="@id/headerRow"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAlbumInfo"
|
||||
app:layout_constraintEnd_toStartOf="@id/actionsLayout"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<!-- Play Mode -->
|
||||
<LinearLayout
|
||||
<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:gravity="center_vertical"
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp">
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="顺序"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
|
||||
<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="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=" · "
|
||||
android:textColor="@color/text_hint"
|
||||
android:layout_marginHorizontal="4dp"/>
|
||||
|
||||
<!-- Interval -->
|
||||
<LinearLayout
|
||||
<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:layout_marginStart="8dp"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/bg_nav_item_ripple"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="4dp">
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="30m"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
|
||||
<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: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:layout_marginStart="4dp"
|
||||
android:text="刚刚"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/text_hint" />
|
||||
</LinearLayout>
|
||||
<!-- Last Scan REMOVED -->
|
||||
<TextView
|
||||
android:id="@+id/tvLastScanTime"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -194,25 +164,26 @@
|
||||
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">
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<!-- Edit Button (Changed to Text Button) -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnEdit"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
android:layout_width="32dp"
|
||||
style="@style/Widget.Material3.Button.OutlinedButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:insetLeft="0dp"
|
||||
android:text="编辑"
|
||||
android:textSize="11sp"
|
||||
android:textColor="@color/text_secondary"
|
||||
app:strokeColor="@color/bg_secondary_modern"
|
||||
app:strokeWidth="1dp"
|
||||
app:cornerRadius="16dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetRight="0dp"
|
||||
android:insetBottom="0dp"
|
||||
android:padding="0dp"
|
||||
app:icon="@drawable/ic_edit"
|
||||
app:iconSize="18dp"
|
||||
app:iconTint="@color/text_secondary"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:rippleColor="#20000000" />
|
||||
android:paddingHorizontal="12dp"
|
||||
android:minWidth="0dp" />
|
||||
|
||||
<!-- Delete Button (Icon) -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnDelete"
|
||||
style="@style/Widget.Material3.Button.IconButton"
|
||||
@@ -225,25 +196,28 @@
|
||||
android:insetBottom="0dp"
|
||||
android:padding="0dp"
|
||||
app:icon="@drawable/ic_delete"
|
||||
app:iconSize="18dp"
|
||||
app:iconSize="16dp"
|
||||
app:iconTint="@color/status_error_text"
|
||||
app:backgroundTint="@android:color/transparent"
|
||||
app:rippleColor="#20FF0000" />
|
||||
|
||||
<!-- Switch Button -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnSwitch"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="使用"
|
||||
android:textSize="12sp"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/sky_blue_primary"
|
||||
app:backgroundTint="@color/sky_blue_container"
|
||||
app:cornerRadius="18dp"
|
||||
app:cornerRadius="16dp"
|
||||
android:insetTop="0dp"
|
||||
android:insetBottom="0dp" />
|
||||
android:insetBottom="0dp"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:minWidth="0dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_app_icon_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<foreground android:drawable="@drawable/ic_app_icon_foreground"/>
|
||||
</adaptive-icon>
|
||||
Reference in new issue
Block a user