Skip to content

Commit

Permalink
fix: change icon variant shortcut icon
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLuo0 committed Jan 26, 2025
1 parent c2f3401 commit 9fea0c1
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
11 changes: 0 additions & 11 deletions app/src/main/res/drawable/icon_variant.xml

This file was deleted.

24 changes: 24 additions & 0 deletions app/src/main/res/drawable/icon_variant_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#43A047">
<group android:scaleX="0.41250733"
android:scaleY="0.41250733"
android:translateX="7.049912"
android:translateY="7.049912">
<path
android:fillColor="@android:color/white"
android:pathData="M3,11h8V3H3V11zM5,5h4v4H5V5z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M13,3v8h8V3H13zM19,9h-4V5h4V9z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M3,21h8v-8H3V21zM5,15h4v4H5V15z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M18,13l-2,0l0,3l-3,0l0,2l3,0l0,3l2,0l0,-3l3,0l0,-2l-3,0z"/>
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/icon_variant.xml
Original file line number Diff line number Diff line change
@@ -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="@color/icon_variant_background"/>
<foreground android:drawable="@drawable/icon_variant_foreground"/>
</adaptive-icon>
4 changes: 4 additions & 0 deletions app/src/main/res/values/icon_variant_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="icon_variant_background">#F5F5F5</color>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/xml/shortcuts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:enabled="true"
android:icon="@drawable/icon_variant"
android:icon="@mipmap/icon_variant"
android:shortcutId="iconVariant"
android:shortcutLongLabel="@string/iconVariantSummary"
android:shortcutShortLabel="@string/iconVariant">
Expand Down

0 comments on commit 9fea0c1

Please sign in to comment.