Center Icon on Android (#602)

Center the icon on Android properly
This commit is contained in:
Erik Balchunas
2025-10-27 23:20:28 +00:00
committed by GitHub
parent 46f98f8b21
commit 6a3cc49e1e
15 changed files with 11 additions and 17 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 48 KiB

@@ -2,24 +2,20 @@
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="300"
android:viewportHeight="300">
android:viewportWidth="1024"
android:viewportHeight="1024">
<group android:scaleX="0.6"
android:scaleY="0.6"
android:translateX="60"
android:translateY="60">
android:translateX="204.8"
android:translateY="204.8">
<path
android:pathData="M139.33,45.77C126.88,45.71 95.33,48.24 71.29,73.2 61.84,83.02 47.31,102.05 44.66,128.33c-6.62,65.67 47.19,92.93 65.1,71 -32.61,12.45 -59.63,-25.85 -53.37,-68.86 3.11,-21.35 15.93,-37.94 25.19,-47.44 5.43,-5.57 22.89,-21.54 47.6,-25.07 35.98,-5.14 81.37,11.69 69.5,52.88 21.4,-17.16 -0.15,-64.77 -59.37,-65.07zM169.4,70.51c-0.14,0.78 15.72,4.18 18.13,20.06 1.84,12.01 -1.96,24.5 -4.15,30.38 -4.38,11.76 -12.18,24.62 -24.35,36.76 -12.17,12.14 -24.86,20.3 -37.63,24.94 -5.87,2.13 -18.25,5.77 -30.19,3.83 -15.56,-2.49 -19,-17.81 -20.18,-17.6 -1.19,0.21 1.4,18.53 18.94,23.25 13.32,3.6 27.52,0.17 34,-1.85 3.24,-1.01 6.47,-2.24 9.68,-3.68 2.94,3.22 11.67,9.66 25.83,3.23 0.52,2.28 1.5,5.27 2.31,8.73 1.73,10.68 2.13,19.22 8.92,28.34 4.94,5.4 8.5,11.66 11.61,18.22 3.08,6.49 4.05,16.71 0.01,25.21 -2.49,5.23 5.36,8.96 7.84,3.73 5.34,-11.23 4.63,-23.96 -0.45,-33.54 -2.82,-7.44 -7.36,-11.58 -11.89,-20.46 -5.93,-7.95 -4.21,-14.06 -4.92,-23.05 -0.4,-5.97 -1.96,-10.85 -3.63,-13.2 0.17,-0.13 0.35,-0.27 0.52,-0.41 1.74,2.53 4.9,5.86 8.05,9.26 6.76,7.51 13.02,15.63 16.52,25.21 1.36,4.15 2.1,8.6 3.46,13.13 0.99,3.3 3.28,9.41 7.59,13.55 6.38,6.14 15.92,7.81 24.12,4.23 4.94,-2.2 1.71,-9.61 -3.27,-7.49 -4.67,2.04 -10.78,1.38 -15.15,-2.72 -2.94,-2.77 -4.87,-7.35 -5.8,-10 -1.47,-4.17 -2.53,-8.67 -4.26,-13.12 -3.34,-8.95 -8.87,-16.22 -17.56,-27.44 -2.8,-3.83 -5.52,-7.67 -7.7,-9.83 1.21,-1.16 2.48,-2.44 3.67,-3.71 1.71,0.9 4.05,1.87 6.36,3.58 4.31,3.42 7.17,8.23 10.2,12.74 9.02,13.82 16.25,18.39 20.72,20.64 5.78,2.91 11.83,4.03 16.24,7.17 3.07,2.4 5.62,6.1 6.59,9.93 1.25,5.55 9.57,3.68 8.33,-1.87 -1.74,-5.75 -5.17,-11.39 -10.04,-14.97 -5.64,-3.96 -12.1,-5.09 -17.38,-7.72 -9.23,-4.59 -14.69,-13.77 -16.95,-17.76 -2.99,-5.82 -5.94,-11.73 -10.74,-16.3 -1.59,-1.49 -3.04,-2.48 -4.33,-3.11 3.47,0.41 8.54,0.89 14.18,2.65 6.76,2.95 9.45,3.32 25,19.96 2.65,3.43 7.37,7.44 11.24,11.2 5.87,5.86 13.05,10.37 21.14,12.26 6.28,1.48 8.51,-7.93 2.24,-9.43 -3.36,-0.8 -11.8,-3.19 -18.54,-8.32 -3.71,-2.93 -6.98,-6.58 -9.85,-9.95 -2.87,-3.37 -5.99,-7.75 -10.07,-11.91 -5.42,-5.37 -11.81,-9.34 -18.42,-11.8 -6.9,-2.57 -11.79,-3.01 -14.9,-2.58 2.51,-5.49 6.1,-17.19 -3.46,-25.9 1.43,-3.25 2.62,-6.47 3.57,-9.62 1.97,-6.51 5.23,-20.59 1.54,-33.81C187.56,73.17 170.99,69.81 169.4,70.51ZM131.44,75.82C119.85,80.45 108.53,88.22 98.6,98.16 88.68,108.1 80.76,119.31 76.34,130.92c-7.23,19 -6.32,68.18 46.43,44.7 -34.35,3.57 -40.66,-19.79 -32.15,-43.81 3.11,-8.78 9.12,-17.34 16.75,-24.96 7.62,-7.62 16.27,-13.4 24.96,-16.75 31.64,-11.64 46.58,-3.83 43.81,32.15C201.59,61.66 144.74,70.52 131.44,75.82ZM147.51,115.49c-7.36,-0.22 -16.22,5.64 -22.99,13.28 -9.03,10.19 -14.35,23.55 -7.5,29.86 6.85,6.31 20.14,-0.7 29.72,-10.87 9.58,-10.17 15.46,-23.51 7.5,-29.86 -1.99,-1.59 -4.28,-2.34 -6.73,-2.41z"
android:strokeWidth="5.66499"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:strokeLineCap="round">
android:pathData="M452.6,76C405.6,75.7 286.3,85.3 195.5,179.7C159.7,216.8 104.8,288.7 94.8,388C69.8,636.2 273.2,739.3 340.9,656.4C217.6,703.4 115.5,558.7 139.1,396.1C150.9,315.4 199.4,252.7 234.4,216.8C254.9,195.8 320.9,135.4 414.3,122.1C550.3,102.6 721.8,166.2 677,321.9C757.9,257.1 676.4,77.1 452.6,76ZM566.2,169.5C565.7,172.4 625.6,185.3 634.8,245.3C641.7,290.7 627.4,337.9 619.1,360.1C602.5,404.6 573,453.2 527,499.1C481,545 433.1,575.8 384.8,593.3C362.6,601.4 315.9,615.1 270.7,607.8C211.9,598.4 198.9,540.5 194.4,541.3C189.9,542.1 199.7,611.3 266,629.2C316.4,642.8 370,629.8 394.5,622.2C406.7,618.3 419,613.7 431.1,608.3C442.2,620.4 475.2,644.8 528.7,620.5C530.7,629.1 534.4,640.4 537.4,653.4C544,693.8 545.5,726.1 571.2,760.5C589.8,780.9 603.3,804.6 615,829.4C626.7,853.9 630.3,892.6 615.1,924.7C605.7,944.4 635.3,958.5 644.7,938.8C664.9,896.3 662.2,848.2 643,812C632.4,783.9 615.2,768.2 598.1,734.7C575.7,704.6 582.2,681.5 579.5,647.5C578,625 572.1,606.5 565.8,597.7C566.4,597.2 567.1,596.7 567.7,596.1C574.3,605.7 586.3,618.3 598.1,631.1C623.7,659.5 647.3,690.2 660.6,726.4C665.7,742.1 668.5,758.9 673.6,776.1C677.4,788.5 686,811.6 702.3,827.3C726.4,850.5 762.5,856.8 793.5,843.3C812.1,834.9 799.9,806.9 781.1,814.9C763.5,822.6 740.4,820.2 723.8,804.7C712.8,794.2 705.4,776.9 701.9,766.9C696.3,751.1 692.4,734.1 685.8,717.3C673.2,683.5 652.3,656 619.5,613.6C608.9,599.1 598.6,584.6 590.4,576.4C594.9,572.1 599.7,567.2 604.2,562.4C610.7,565.8 619.6,569.5 628.3,575.9C644.6,588.9 655.4,607.1 666.8,624.1C700.9,676.3 728.2,693.6 745.1,702.1C767,713.1 789.9,717.3 806.5,729.2C818.1,738.3 827.8,752.3 831.4,766.7C836.2,787.7 867.6,780.6 862.9,759.6C856.3,737.9 843.4,716.6 825,703C803.7,688.1 779.2,683.8 759.3,673.9C724.4,656.5 703.7,621.9 695.2,606.8C683.9,584.8 672.7,562.4 654.6,545.2C648.6,539.6 643.1,535.8 638.2,533.4C651.4,535 670.5,536.8 691.8,543.4C717.4,554.6 727.5,556 786.3,618.9C796.3,631.8 814.2,647 828.8,661.2C851,683.3 878.1,700.4 908.7,707.5C932.5,713.1 940.9,677.6 917.2,671.9C904.5,668.9 872.6,659.9 847.1,640.5C833.1,629.4 820.7,615.6 809.9,602.9C799.1,590.1 787.3,573.6 771.8,557.9C751.4,537.6 727.2,522.6 702.2,513.3C676.1,503.6 657.6,501.9 645.9,503.5C655.4,482.8 669,438.5 632.8,405.6C638.2,393.3 642.7,381.2 646.3,369.3C653.8,344.7 666.1,291.5 652.1,241.5C634.9,179.5 572.3,166.9 566.2,169.5ZM422.8,189.6C379,207.1 336.2,236.4 298.7,274C261.2,311.6 231.2,353.9 214.5,397.8C187.2,469.6 190.7,655.5 390,566.8C260.2,580.3 236.4,492 268.5,401.2C280.3,368 303,335.6 331.8,306.8C360.6,278 393.3,256.2 426.2,243.5C545.8,199.6 602.2,229.1 591.8,365C687.9,136 473,169.5 422.8,189.6ZM483.5,339.5C455.7,338.7 422.2,360.8 396.6,389.7C362.5,428.2 342.4,478.7 368.3,502.6C394.2,526.4 444.4,499.9 480.6,461.5C516.8,423 539.1,372.6 509,348.6C501.4,342.6 492.8,339.8 483.5,339.5Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="76.6"
android:startY="82.72"
android:endX="233.49"
android:endY="239.61"
<gradient
android:startX="215.5"
android:startY="215.6"
android:endX="808.5"
android:endY="808.6"
android:type="linear">
<item android:offset="0" android:color="#FF00DBB9"/>
<item android:offset="1" android:color="#FF7317FF"/>
@@ -2,5 +2,4 @@
<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"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
@@ -2,5 +2,4 @@
<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"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 13 KiB

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#111014</color>
<color name="ic_launcher_background">#0D0E19</color>
</resources>