feat: 添加Android app自适应图标

- 深蓝渐变背景 + 白色摄像头/信封前景的vector drawable图标
- 支持Android 8.0+ 自适应图标(圆形/圆角方形等)
- Manifest添加icon和roundIcon引用

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
let5sne.win10
2026-02-14 21:40:07 +08:00
parent b2ec97215f
commit 1d6ee0a95e
5 changed files with 77 additions and 0 deletions

View File

@@ -10,6 +10,8 @@
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:label="USB摄像头"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 图标背景:深蓝渐变 -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#1B2838"
android:pathData="M0,0 L108,0 L108,108 L0,108 Z" />
<!-- 装饰:对角线条纹 -->
<path
android:fillColor="#22374D"
android:pathData="M0,90 L90,0 L108,0 L108,18 L18,108 L0,108 Z" />
<path
android:fillColor="#22374D"
android:pathData="M0,60 L60,0 L72,0 L0,72 Z" />
</vector>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 图标前景:摄像头 + 信封组合 -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<!-- 摄像头机身 -->
<path
android:fillColor="#FFFFFF"
android:pathData="M34,40 L74,40 C76.2,40 78,41.8 78,44 L78,68 C78,70.2 76.2,72 74,72 L34,72 C31.8,72 30,70.2 30,68 L30,44 C30,41.8 31.8,40 34,40 Z" />
<!-- 摄像头镜头外圈 -->
<path
android:fillColor="#1B2838"
android:pathData="M54,48 m-11,0 a11,11 0,1 1,22 0 a11,11 0,1 1,-22 0" />
<!-- 摄像头镜头内圈 -->
<path
android:fillColor="#42A5F5"
android:pathData="M54,48 m-7,0 a7,7 0,1 1,14 0 a7,7 0,1 1,-14 0" />
<!-- 镜头高光 -->
<path
android:fillColor="#90CAF9"
android:pathData="M50,45 m-2,0 a2,2 0,1 1,4 0 a2,2 0,1 1,-4 0" />
<!-- 闪光灯 -->
<path
android:fillColor="#FFD54F"
android:pathData="M68,44 m-2,0 a2,2 0,1 1,4 0 a2,2 0,1 1,-4 0" />
<!-- 信封图标(右下角) -->
<path
android:fillColor="#FFFFFF"
android:pathData="M60,62 L76,62 C77.1,62 78,62.9 78,64 L78,72 C78,73.1 77.1,74 76,74 L60,74 C58.9,74 58,73.1 58,72 L58,64 C58,62.9 58.9,62 60,62 Z" />
<path
android:pathData="M58,63 L68,69 L78,63"
android:strokeWidth="1.2"
android:strokeColor="#1B2838"
android:fillColor="#00000000" />
</vector>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>