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

Fix: fix android 13 adaptable launcher icons #552

Merged
merged 4 commits into from
Jun 1, 2024
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
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:appCategory="productivity"
android:banner="@drawable/ic_launcher_foreground"
android:enableOnBackInvokedCallback="true"
android:icon="@drawable/ic_launcher_background"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
Expand Down
32 changes: 32 additions & 0 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1445"
android:viewportHeight="1445">
<group
android:name="logogroup"
android:pivotX="54"
android:pivotY="54"
android:translateX="96.90746491494747"
android:translateY="82.00398531293763">
<path
android:name="path"
android:pathData="M 394.092 776.79 C 318.321 640.601 368.314 468.818 505.794 393.759 C 643.274 318.701 816.687 368.224 892.457 504.413"
android:strokeColor="@color/logo_accent"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_1"
android:pathData="M 643.274 922.264 C 486.266 922.264 358.941 796.135 358.941 640.601 C 358.941 485.068 486.266 358.939 643.274 358.939"
android:strokeColor="@color/logo_stroke"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_2"
android:pathData="M 523.76 640.601 C 523.76 609.214 536.361 579.08 558.765 556.886 C 581.17 534.692 611.589 522.21 643.274 522.21 C 674.96 522.21 705.379 534.692 727.783 556.886 C 750.188 579.08 762.788 609.214 762.788 640.601 C 762.788 671.989 750.188 702.122 727.783 724.316 C 705.379 746.51 674.96 758.993 643.274 758.993 C 611.589 758.993 581.17 746.51 558.765 724.316 C 536.361 702.122 523.76 671.989 523.76 640.601 Z"
android:strokeColor="@color/logo_stroke"
android:strokeWidth="105"/>
</group>
</vector>
32 changes: 32 additions & 0 deletions app/src/main/res/drawable-v24/ic_launcher_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1445"
android:viewportHeight="1445">
<group
android:name="logogroup"
android:pivotX="54"
android:pivotY="54"
android:translateX="96.90746491494747"
android:translateY="82.00398531293763">
<path
android:name="path"
android:pathData="M 394.092 776.79 C 318.321 640.601 368.314 468.818 505.794 393.759 C 643.274 318.701 816.687 368.224 892.457 504.413"
android:strokeColor="#000000"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_1"
android:pathData="M 643.274 922.264 C 486.266 922.264 358.941 796.135 358.941 640.601 C 358.941 485.068 486.266 358.939 643.274 358.939"
android:strokeColor="#000000"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_2"
android:pathData="M 523.76 640.601 C 523.76 609.214 536.361 579.08 558.765 556.886 C 581.17 534.692 611.589 522.21 643.274 522.21 C 674.96 522.21 705.379 534.692 727.783 556.886 C 750.188 579.08 762.788 609.214 762.788 640.601 C 762.788 671.989 750.188 702.122 727.783 724.316 C 705.379 746.51 674.96 758.993 643.274 758.993 C 611.589 758.993 581.17 746.51 558.765 724.316 C 536.361 702.122 523.76 671.989 523.76 640.601 Z"
android:strokeColor="#000000"
android:strokeWidth="105"/>
</group>
</vector>
47 changes: 12 additions & 35 deletions app/src/main/res/drawable/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
<!--
~ This file is part of Cosmic IDE.
~ Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
~ Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
~ You should have received a copy of the GNU General Public License along with Cosmic IDE. If not, see <https://www.gnu.org/licenses/>.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1445"
android:viewportHeight="1445">

<path
android:fillColor="@color/logo_background"
android:pathData="M0,0h1445v1445h-1445z" />

<path
android:pathData="M404,899C307,723 371,501 547,404C723,307 945,371 1042,547"
android:strokeWidth="100"
android:strokeColor="@color/logo_accent"
android:strokeLineCap="round" />

<path
android:pathData="M723,1087C522,1087 359,924 359,723C359,522 522,359 723,359"
android:strokeWidth="100"
android:strokeColor="@color/logo_stroke"
android:strokeLineCap="round" />

<path
android:pathData="M570,723a153,153 0,1 1,306 0a153,153 0,1 1,-306 0"
android:strokeWidth="150"
android:strokeColor="@color/logo_stroke" />

</vector>
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:name="path"
android:pathData="M -14.204 130.914 L -14.204 -20.449 L 123.817 -20.449 L 123.817 130.914 Z"
android:fillColor="@color/logo_background"
android:strokeWidth="0"/>
</vector>
42 changes: 20 additions & 22 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,35 @@
~ You should have received a copy of the GNU General Public License along with Cosmic IDE. If not, see <https://www.gnu.org/licenses/>.
-->

<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1445"
android:viewportHeight="1445">

<group
android:name="logoGroup"
android:name="logogroup"
android:pivotX="54"
android:pivotY="54">

android:pivotY="54"
android:translateX="96.90746491494747"
android:translateY="82.00398531293763">
<path
android:fillColor="@color/logo_background"
android:pathData="M404,899C307,723 371,501 547,404C723,307 945,371 1042,547"
android:strokeWidth="100"
android:name="path"
android:pathData="M 394.092 776.79 C 318.321 640.601 368.314 468.818 505.794 393.759 C 643.274 318.701 816.687 368.224 892.457 504.413"
android:strokeColor="@color/logo_accent"
android:strokeLineCap="round" />

android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:fillColor="@color/logo_background"
android:pathData="M723,1087C522,1087 359,924 359,723C359,522 522,359 723,359"
android:strokeWidth="100"
android:name="path_1"
android:pathData="M 643.274 922.264 C 486.266 922.264 358.941 796.135 358.941 640.601 C 358.941 485.068 486.266 358.939 643.274 358.939"
android:strokeColor="@color/logo_stroke"
android:strokeLineCap="round" />

android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:fillColor="@color/logo_background"
android:pathData="M570,723a153,153 0,1 1,306 0a153,153 0,1 1,-306 0"
android:strokeWidth="150"
android:strokeColor="@color/logo_stroke" />

android:name="path_2"
android:pathData="M 523.76 640.601 C 523.76 609.214 536.361 579.08 558.765 556.886 C 581.17 534.692 611.589 522.21 643.274 522.21 C 674.96 522.21 705.379 534.692 727.783 556.886 C 750.188 579.08 762.788 609.214 762.788 640.601 C 762.788 671.989 750.188 702.122 727.783 724.316 C 705.379 746.51 674.96 758.993 643.274 758.993 C 611.589 758.993 581.17 746.51 558.765 724.316 C 536.361 702.122 523.76 671.989 523.76 640.601 Z"
android:strokeColor="@color/logo_stroke"
android:strokeWidth="105"/>
</group>

</vector>
</vector>
39 changes: 39 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,39 @@
<!--
~ This file is part of Cosmic IDE.
~ Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
~ Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
~ You should have received a copy of the GNU General Public License along with Cosmic IDE. If not, see <https://www.gnu.org/licenses/>.
-->

<vector
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="vector"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1445"
android:viewportHeight="1445">
<group
android:name="logogroup"
android:pivotX="54"
android:pivotY="54"
android:translateX="96.90746491494747"
android:translateY="82.00398531293763">
<path
android:name="path"
android:pathData="M 394.092 776.79 C 318.321 640.601 368.314 468.818 505.794 393.759 C 643.274 318.701 816.687 368.224 892.457 504.413"
android:strokeColor="#000000"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_1"
android:pathData="M 643.274 922.264 C 486.266 922.264 358.941 796.135 358.941 640.601 C 358.941 485.068 486.266 358.939 643.274 358.939"
android:strokeColor="#000000"
android:strokeWidth="70"
android:strokeLineCap="round"/>
<path
android:name="path_2"
android:pathData="M 523.76 640.601 C 523.76 609.214 536.361 579.08 558.765 556.886 C 581.17 534.692 611.589 522.21 643.274 522.21 C 674.96 522.21 705.379 534.692 727.783 556.886 C 750.188 579.08 762.788 609.214 762.788 640.601 C 762.788 671.989 750.188 702.122 727.783 724.316 C 705.379 746.51 674.96 758.993 643.274 758.993 C 611.589 758.993 581.17 746.51 558.765 724.316 C 536.361 702.122 523.76 671.989 523.76 640.601 Z"
android:strokeColor="#000000"
android:strokeWidth="105"/>
</group>
</vector>
7 changes: 7 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?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" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />

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

</adaptive-icon>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi/ic_launcher.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
2 changes: 1 addition & 1 deletion app/src/main/res/mipmap-anydpi/ic_launcher_round.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,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_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>