Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Themed / Monochrome launcher app icon support #56

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?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="M54.000977 32.024992c-11.208698 0-20.500018 8.472604-21.810942 19.338243H0v5.273533h32.190035c1.310924 10.865629 10.602244 19.33824 21.810942 19.33824 11.208694 0 20.499877-8.472611 21.810941-19.33824H108v-5.273534H75.811918c-1.311064-10.865638-10.602247-19.338242-21.810941-19.338242Zm0 5.906357c8.909639 0 16.06865 7.159007 16.06865 16.068648 0 8.90965-7.159011 16.06865-16.06865 16.06865-8.90964 0-16.06865-7.159-16.06865-16.06865 0-8.909641 7.15901-16.068648 16.06865-16.068648z M32.076752 52.583957c -0.0026 0.0412 -0.0074 0.0818 -0.0098 0.12305 0.0026 -0.0412 0.007 -0.082 0.0098 -0.12305z m43.848448 0c 0.0028 0.0411 0.0072 0.0819 0.0098 0.12305 -0.0024 -0.0412 -0.0071 -0.0819 -0.0098 -0.12305z m-43.858214 2.70904c 0.0024 0.0412 0.0071 0.0819 0.0098 0.12304 -0.0028 -0.0411 -0.0072 -0.0819 -0.0098 -0.12304z m43.867981 0c -0.0024 0.0412 -0.007 0.082 -0.0098 0.12304 0.0028 -0.0412 0.0073 -0.0818 0.0098 -0.12304z"/>


</vector>
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<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"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we just use ic_launcher_foreground?

Copy link
Author

@sebastien46 sebastien46 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we just use ic_launcher_foreground?

Unfortunately not, as it only comprises of the center circle, not the line across (which is in ic_launcher_background), unless that's what you want:

ic_launcher_foreground

Also, the fill needs to be one color only, as it appears as a fully white vector to the launcher

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't think mean that the icons won't actually match? What does that new icon look like side by side with the old?

Copy link
Author

@sebastien46 sebastien46 Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't think mean that the icons won't actually match? What does that new icon look like side by side with the old?

Old vs New vs New (Night Mode) Square (Yellow Theme):

image
image
image

Old vs New vs New (Night Mode) Circle (Yellow Theme):

image
image
image

It pretty much works with any color.

</adaptive-icon>
1 change: 1 addition & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<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"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>