Skip to content

Commit

Permalink
Tweak Kore icon and add monochrome icon for Android 13+ (#899)
Browse files Browse the repository at this point in the history
The main app icon was using a wrong viewport width/height of 135x135 instead of 108x108, which caused it to appear small in some situations. This fixes that.
It also adds the icon in monochrome so that in Android 13+ it can be themed by the system.
  • Loading branch information
SyncedSynapse authored Sep 16, 2022
1 parent 68632a4 commit 01bfdd8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/color/ic_launcher_shadow.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<gradient xmlns:android="http://schemas.android.com/apk/res/android"
android:centerX="67.5" android:centerY="67.5" android:gradientRadius="76.37" android:type="radial">
android:centerX="54" android:centerY="54" android:gradientRadius="61" android:type="radial">
<item android:color="#15000000" android:offset="0.0" />
<item android:color="#10000000" android:offset="0.32" />
<item android:color="#05000000" android:offset="0.62" />
Expand Down
36 changes: 16 additions & 20 deletions app/src/main/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="72dp"
android:height="72dp"
android:viewportHeight="135.46667"
android:viewportWidth="135.46666">
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillAlpha="1"
android:fillColor="@color/ic_launcher_shadow"
android:pathData="M125.18,96.5l-11.79,11.79l-46.77,-46.77l11.79,-11.79z" />
android:pathData="M99.42,76.51 L89.99,85.94 52.58,48.53 62.01,39.1Z"
android:fillColor="@color/ic_launcher_shadow" />
<path
android:fillAlpha="1"
android:fillColor="@color/ic_launcher_shadow"
android:pathData="M108.28,113.39l-11.79,11.79l-46.77,-46.77l11.79,-11.79z" />
android:pathData="M85.9,90.02 L76.47,99.46 39.06,62.04 48.49,52.61Z"
android:fillColor="@color/ic_launcher_shadow"/>
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m90.79,73.55c-3.4,3.41 -5.29,5.15 -5.7,5.24 -0.36,0.08 -0.86,-0 -1.22,-0.19 -0.34,-0.18 -2.77,-2.49 -5.4,-5.13 -4.77,-4.8 -4.78,-4.81 -4.78,-5.77 0,-0.96 0.01,-0.97 4.78,-5.77 2.63,-2.64 5.06,-4.95 5.4,-5.13 0.37,-0.19 0.87,-0.27 1.22,-0.19 0.4,0.09 2.3,1.83 5.7,5.24 4.64,4.66 5.09,5.18 5.09,5.86 -0,0.68 -0.45,1.2 -5.09,5.86z" />
android:pathData="m71.91,58.15c-2.72,2.73 -4.23,4.12 -4.56,4.19 -0.29,0.06 -0.69,0 -0.98,-0.15 -0.27,-0.14 -2.22,-1.99 -4.32,-4.1 -3.82,-3.84 -3.82,-3.85 -3.82,-4.62 0,-0.77 0.01,-0.78 3.82,-4.62 2.1,-2.11 4.05,-3.96 4.32,-4.1 0.3,-0.15 0.7,-0.22 0.98,-0.15 0.32,0.07 1.84,1.46 4.56,4.19 3.71,3.73 4.07,4.14 4.07,4.69 0,0.54 -0.36,0.96 -4.07,4.69z"
android:fillColor="#ffffff"/>
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m78.76,85.38c-0.1,0.24 -2.45,2.69 -5.21,5.44 -4.58,4.55 -5.09,5 -5.78,5 -0.68,0 -1.2,-0.45 -5.85,-5.09 -3.41,-3.4 -5.15,-5.29 -5.24,-5.69 -0.08,-0.36 0,-0.86 0.19,-1.22 0.18,-0.34 2.49,-2.77 5.13,-5.4 4.8,-4.77 4.81,-4.78 5.77,-4.78 0.96,-0 0.97,0.01 5.77,4.77 2.64,2.63 4.94,5.04 5.12,5.37 0.35,0.66 0.37,0.96 0.1,1.6z" />
android:pathData="m62.29,67.62c-0.08,0.19 -1.96,2.15 -4.17,4.35 -3.66,3.64 -4.07,4 -4.62,4 -0.54,0 -0.96,-0.36 -4.68,-4.07 -2.73,-2.72 -4.12,-4.23 -4.19,-4.55 -0.06,-0.29 0,-0.69 0.15,-0.98 0.14,-0.27 1.99,-2.22 4.1,-4.32 3.84,-3.82 3.85,-3.82 4.62,-3.82 0.77,0 0.78,0.01 4.62,3.82 2.11,2.1 3.95,4.03 4.1,4.3 0.28,0.53 0.3,0.77 0.08,1.28z"
android:fillColor="#ffffff"/>
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m78.56,51.78c-0.23,0.36 -2.54,2.76 -5.13,5.33 -6.24,6.19 -5.09,6.2 -11.44,-0.11 -2.64,-2.63 -4.95,-5.05 -5.13,-5.39 -0.19,-0.37 -0.27,-0.87 -0.19,-1.22 0.09,-0.4 1.83,-2.3 5.24,-5.69 4.66,-4.65 5.17,-5.09 5.86,-5.09 0.68,-0 1.19,0.44 5.86,5.1 5.53,5.52 5.74,5.82 4.93,7.08z" />
android:pathData="m62.13,40.74c-0.18,0.29 -2.03,2.21 -4.1,4.26 -4.99,4.95 -4.07,4.96 -9.15,-0.09 -2.11,-2.1 -3.96,-4.04 -4.1,-4.31 -0.15,-0.3 -0.22,-0.7 -0.15,-0.98 0.07,-0.32 1.46,-1.84 4.19,-4.55 3.73,-3.72 4.14,-4.07 4.69,-4.07 0.54,0 0.95,0.35 4.69,4.08 4.42,4.42 4.59,4.66 3.94,5.66z"
android:fillColor="#ffffff"/>
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:pathData="m57.06,73.47c-2.63,2.64 -5.06,4.95 -5.4,5.13 -0.37,0.19 -0.87,0.27 -1.22,0.19 -0.4,-0.09 -2.3,-1.83 -5.7,-5.24 -4.64,-4.66 -5.09,-5.18 -5.09,-5.86 -0,-0.68 0.45,-1.2 5.09,-5.86 3.4,-3.41 5.29,-5.15 5.7,-5.24 0.36,-0.08 0.86,0 1.22,0.19 0.34,0.18 2.77,2.49 5.4,5.13 4.77,4.8 4.78,4.81 4.78,5.77 0,0.96 -0.01,0.97 -4.78,5.77z" />
android:pathData="m44.93,58.09c-2.1,2.11 -4.05,3.96 -4.32,4.1 -0.3,0.15 -0.7,0.22 -0.98,0.15 -0.32,-0.07 -1.84,-1.46 -4.56,-4.19C31.36,54.42 31,54.01 31,53.46c0,-0.54 0.36,-0.96 4.07,-4.69 2.72,-2.73 4.23,-4.12 4.56,-4.19 0.29,-0.06 0.69,0 0.98,0.15 0.27,0.14 2.22,1.99 4.32,4.1 3.82,3.84 3.82,3.85 3.82,4.62 0,0.77 -0.01,0.78 -3.82,4.62z"
android:fillColor="#ffffff"/>
</vector>
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/ic_launcher_foreground_monochrome.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="m71.91,58.15c-2.72,2.73 -4.23,4.12 -4.56,4.19 -0.29,0.06 -0.69,0 -0.98,-0.15 -0.27,-0.14 -2.22,-1.99 -4.32,-4.1 -3.82,-3.84 -3.82,-3.85 -3.82,-4.62 0,-0.77 0.01,-0.78 3.82,-4.62 2.1,-2.11 4.05,-3.96 4.32,-4.1 0.3,-0.15 0.7,-0.22 0.98,-0.15 0.32,0.07 1.84,1.46 4.56,4.19 3.71,3.73 4.07,4.14 4.07,4.69 0,0.54 -0.36,0.96 -4.07,4.69z"
android:fillColor="#ffffff"/>
<path
android:pathData="m62.29,67.62c-0.08,0.19 -1.96,2.15 -4.17,4.35 -3.66,3.64 -4.07,4 -4.62,4 -0.54,0 -0.96,-0.36 -4.68,-4.07 -2.73,-2.72 -4.12,-4.23 -4.19,-4.55 -0.06,-0.29 0,-0.69 0.15,-0.98 0.14,-0.27 1.99,-2.22 4.1,-4.32 3.84,-3.82 3.85,-3.82 4.62,-3.82 0.77,0 0.78,0.01 4.62,3.82 2.11,2.1 3.95,4.03 4.1,4.3 0.28,0.53 0.3,0.77 0.08,1.28z"
android:fillColor="#ffffff"/>
<path
android:pathData="m62.13,40.74c-0.18,0.29 -2.03,2.21 -4.1,4.26 -4.99,4.95 -4.07,4.96 -9.15,-0.09 -2.11,-2.1 -3.96,-4.04 -4.1,-4.31 -0.15,-0.3 -0.22,-0.7 -0.15,-0.98 0.07,-0.32 1.46,-1.84 4.19,-4.55 3.73,-3.72 4.14,-4.07 4.69,-4.07 0.54,0 0.95,0.35 4.69,4.08 4.42,4.42 4.59,4.66 3.94,5.66z"
android:fillColor="#ffffff"/>
<path
android:pathData="m44.93,58.09c-2.1,2.11 -4.05,3.96 -4.32,4.1 -0.3,0.15 -0.7,0.22 -0.98,0.15 -0.32,-0.07 -1.84,-1.46 -4.56,-4.19C31.36,54.42 31,54.01 31,53.46c0,-0.54 0.36,-0.96 4.07,-4.69 2.72,-2.73 4.23,-4.12 4.56,-4.19 0.29,-0.06 0.69,0 0.98,0.15 0.27,0.14 2.22,1.99 4.32,4.1 3.82,3.84 3.82,3.85 3.82,4.62 0,0.77 -0.01,0.78 -3.82,4.62z"
android:fillColor="#ffffff"/>
</vector>
3 changes: 3 additions & 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,7 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>

<!-- For monochrome icons in Android 13+ -->
<monochrome android:drawable="@drawable/ic_launcher_foreground_monochrome"/>
</adaptive-icon>

0 comments on commit 01bfdd8

Please sign in to comment.