feat: added custom icons for launcher and notification

This commit is contained in:
2022-02-27 18:48:49 +02:00
parent bdf317a1bc
commit 2cc0b4b75d
24 changed files with 246 additions and 15 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,53 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<group android:scaleX="0.15333334"
android:scaleY="0.15333334"
android:translateX="0.96"
android:translateY="0.96">
<path
android:pathData="M0,144L144,144L144,0L0,0Z"
android:strokeAlpha="0"
android:fillColor="#662d91"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<group>
<clip-path
android:pathData="M-54.542,-54.542L198.542,-54.542L198.542,198.542L-54.542,198.542Z"/>
<path
android:pathData="m73.388,111.487c1.275,12.078 -11.656,23.347 -28.884,25.166 -17.229,1.821 -32.231,-6.498 -33.506,-18.576 -1.275,-12.08 11.658,-23.347 28.887,-25.168C57.113,91.091 72.113,99.41 73.388,111.487"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="M73.497,111.476 L65.803,113.156C64.473,113.447 63.279,111.45 63.139,108.697l-4.431,-86.775c-0.168,-3.276 1.214,-5.99 2.787,-5.479L66.926,18.209c1.085,0.354 1.919,2.168 2.034,4.424z"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m117.074,40.043 l-51.894,-7.185c-4.11,-0.569 -6.983,-4.366 -6.414,-8.478l0.033,-2.96c0.972,-2.26 0.158,-6.942 3.095,-6.535l57.616,7.561c2.936,0.408 4.987,3.117 4.579,6.053l-0.963,6.962c-0.405,2.936 -3.114,4.987 -6.051,4.581"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m127.042,56.426 l-31.802,10.135c-0.48,0.155 -1.005,-0.251 -1.066,-0.82l-0.021,-0.199c-0.192,-1.807 -0.89,-3.553 -1.994,-4.991 -0.302,-0.396 -0.209,-0.968 0.19,-1.155L123.028,45.063C123.421,44.88 125.704,47.334 125.704,47.334 126.929,48.908 127.677,50.849 127.825,52.838 127.825,52.838 127.649,56.231 127.042,56.426"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m127.3,91.063 l-31.697,-2.519c-0.314,-0.026 -0.523,-0.403 -0.424,-0.769l0.173,-0.651c0.455,-1.687 0.462,-3.503 0.028,-5.191l-0.122,-0.464c-0.075,-0.293 0.098,-0.595 0.349,-0.609L127.816,79.002C128.114,78.983 129.182,82.214 129.182,82.214 129.677,84.068 129.644,86.076 129.091,87.916 129.091,87.916 127.788,91.103 127.3,91.063"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m121.449,122.465 l-28.636,-12.04c-0.284,-0.117 -0.359,-0.541 -0.152,-0.858l0.363,-0.565c0.947,-1.465 1.526,-3.187 1.645,-4.923l0.035,-0.478c0.021,-0.3 0.274,-0.534 0.513,-0.473L125.693,111.163C125.976,111.236 125.96,114.631 125.96,114.631 125.838,116.543 125.18,118.442 124.092,120.021 124.092,120.021 121.887,122.65 121.449,122.465"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
</group>
</group>
</vector>
Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- <item>
<bitmap <!-- The background color -->
<item android:drawable="@drawable/ic_launcher_background"/>
<!-- App logo -->
<item
android:drawable="@drawable/ic_launcher_foreground"
android:gravity="center" android:gravity="center"
android:src="@mipmap/launch_image" /> android:width="400dp"
</item> --> android:height="400dp" />
</layer-list> </layer-list>
Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

@@ -0,0 +1,116 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.7575"
android:scaleY="0.7575"
android:translateX="-0.54"
android:translateY="-0.54">
<path
android:pathData="M0,144L144,144L144,0L0,0Z"
android:fillColor="#662d91"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<group>
<clip-path
android:pathData="M17.809,17.809L126.191,17.809L126.191,126.191L17.809,126.191Z"/>
<path
android:pathData="M126.191,126.191L17.809,126.191l0,-108.383l108.383,-0z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="1.0035449"
android:fillColor="#00000000"
android:strokeColor="#662d91"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
<path
android:pathData="m72.594,88.91c0.546,5.172 -4.992,9.998 -12.37,10.777 -7.378,0.78 -13.803,-2.783 -14.349,-7.955 -0.546,-5.173 4.993,-9.998 12.371,-10.778C65.625,80.175 72.048,83.738 72.594,88.91"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="m72.594,88.91c0.546,5.172 -4.992,9.998 -12.37,10.777 -7.378,0.78 -13.803,-2.783 -14.349,-7.955 -0.546,-5.173 4.993,-9.998 12.371,-10.778C65.625,80.175 72.048,83.738 72.594,88.91Z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="1.0035449"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
<path
android:pathData="M72.641,88.905 L69.346,89.625C68.776,89.749 68.265,88.894 68.205,87.715l-1.898,-37.161c-0.072,-1.403 0.52,-2.565 1.193,-2.346L69.827,48.964c0.464,0.152 0.822,0.928 0.871,1.895z"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="M72.762,89.054 L69.347,89.779c-0.59,0.125 -1.12,-0.736 -1.182,-1.923L66.198,50.427c-0.074,-1.413 0.539,-2.583 1.237,-2.363l2.411,0.762c0.481,0.153 0.851,0.935 0.903,1.908z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="0.7129946"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
<path
android:pathData="m91.303,58.314 l-22.224,-3.077c-1.76,-0.244 -2.991,-1.87 -2.747,-3.631l0.014,-1.268c0.416,-0.968 0.068,-2.973 1.325,-2.798l24.674,3.238c1.257,0.175 2.136,1.335 1.961,2.592l-0.412,2.982c-0.174,1.257 -1.334,2.136 -2.591,1.962"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="m95.572,65.33 l-13.619,4.34c-0.206,0.066 -0.431,-0.107 -0.457,-0.351l-0.009,-0.085c-0.082,-0.774 -0.381,-1.521 -0.854,-2.138 -0.129,-0.17 -0.089,-0.414 0.081,-0.495L93.852,60.464C94.021,60.386 94.999,61.437 94.999,61.437 95.523,62.111 95.844,62.942 95.907,63.794 95.907,63.794 95.831,65.247 95.572,65.33"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="m95.572,65.33 l-13.619,4.34c-0.206,0.066 -0.431,-0.107 -0.457,-0.351l-0.009,-0.085c-0.082,-0.774 -0.381,-1.521 -0.854,-2.138 -0.129,-0.17 -0.089,-0.414 0.081,-0.495L93.852,60.464C94.021,60.386 94.999,61.437 94.999,61.437 95.523,62.111 95.844,62.942 95.907,63.794 95.907,63.794 95.831,65.247 95.572,65.33Z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="1.0035449"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
<path
android:pathData="m95.682,80.164 l-13.574,-1.079c-0.134,-0.011 -0.224,-0.173 -0.182,-0.329l0.074,-0.279c0.195,-0.723 0.198,-1.5 0.012,-2.223l-0.052,-0.199c-0.032,-0.125 0.042,-0.255 0.15,-0.261L95.903,74.998C96.03,74.99 96.488,76.374 96.488,76.374 96.7,77.168 96.686,78.028 96.449,78.816 96.449,78.816 95.891,80.181 95.682,80.164"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="m95.682,80.164 l-13.574,-1.079c-0.134,-0.011 -0.224,-0.173 -0.182,-0.329l0.074,-0.279c0.195,-0.723 0.198,-1.5 0.012,-2.223l-0.052,-0.199c-0.032,-0.125 0.042,-0.255 0.15,-0.261L95.903,74.998C96.03,74.99 96.488,76.374 96.488,76.374 96.7,77.168 96.686,78.028 96.449,78.816 96.449,78.816 95.891,80.181 95.682,80.164Z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="1.0035449"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
<path
android:pathData="m93.176,93.612 l-12.263,-5.156c-0.121,-0.05 -0.154,-0.232 -0.065,-0.367l0.156,-0.242c0.405,-0.627 0.653,-1.365 0.704,-2.108l0.015,-0.205c0.009,-0.128 0.117,-0.229 0.22,-0.203L94.994,88.771C95.115,88.803 95.108,90.257 95.108,90.257 95.056,91.076 94.774,91.888 94.308,92.565 94.308,92.565 93.364,93.691 93.176,93.612"
android:strokeAlpha="0"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<path
android:pathData="m93.176,93.612 l-12.263,-5.156c-0.121,-0.05 -0.154,-0.232 -0.065,-0.367l0.156,-0.242c0.405,-0.627 0.653,-1.365 0.704,-2.108l0.015,-0.205c0.009,-0.128 0.117,-0.229 0.22,-0.203L94.994,88.771C95.115,88.803 95.108,90.257 95.108,90.257 95.056,91.076 94.774,91.888 94.308,92.565 94.308,92.565 93.364,93.691 93.176,93.612Z"
android:strokeAlpha="0"
android:strokeLineJoin="miter"
android:strokeWidth="1.0035449"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:fillAlpha="0"
android:strokeLineCap="butt"/>
</group>
</group>
</vector>
@@ -0,0 +1,50 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.75"
android:scaleY="0.75">
<path
android:pathData="M0,144L144,144L144,0L0,0Z"
android:strokeAlpha="0"
android:fillColor="#662d91"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="0"/>
<group>
<clip-path
android:pathData="M17.809,17.809L126.191,17.809L126.191,126.191L17.809,126.191Z"/>
<path
android:pathData="m72.594,88.91c0.546,5.172 -4.992,9.998 -12.37,10.777 -7.378,0.78 -13.803,-2.783 -14.349,-7.955 -0.546,-5.173 4.993,-9.998 12.371,-10.778C65.625,80.175 72.048,83.738 72.594,88.91"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="M72.641,88.905 L69.346,89.625C68.776,89.749 68.265,88.894 68.205,87.715l-1.898,-37.161c-0.072,-1.403 0.52,-2.565 1.193,-2.346L69.827,48.964c0.464,0.152 0.822,0.928 0.871,1.895z"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m91.303,58.314 l-22.224,-3.077c-1.76,-0.244 -2.991,-1.87 -2.747,-3.631l0.014,-1.268c0.416,-0.968 0.068,-2.973 1.325,-2.798l24.674,3.238c1.257,0.175 2.136,1.335 1.961,2.592l-0.412,2.982c-0.174,1.257 -1.334,2.136 -2.591,1.962"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m95.572,65.33 l-13.619,4.34c-0.206,0.066 -0.431,-0.107 -0.457,-0.351l-0.009,-0.085c-0.082,-0.774 -0.381,-1.521 -0.854,-2.138 -0.129,-0.17 -0.089,-0.414 0.081,-0.495L93.852,60.464C94.021,60.386 94.999,61.437 94.999,61.437 95.523,62.111 95.844,62.942 95.907,63.794 95.907,63.794 95.831,65.247 95.572,65.33"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m95.682,80.164 l-13.574,-1.079c-0.134,-0.011 -0.224,-0.173 -0.182,-0.329l0.074,-0.279c0.195,-0.723 0.198,-1.5 0.012,-2.223l-0.052,-0.199c-0.032,-0.125 0.042,-0.255 0.15,-0.261L95.903,74.998C96.03,74.99 96.488,76.374 96.488,76.374 96.7,77.168 96.686,78.028 96.449,78.816 96.449,78.816 95.891,80.181 95.682,80.164"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
<path
android:pathData="m93.176,93.612 l-12.263,-5.156c-0.121,-0.05 -0.154,-0.232 -0.065,-0.367l0.156,-0.242c0.405,-0.627 0.653,-1.365 0.704,-2.108l0.015,-0.205c0.009,-0.128 0.117,-0.229 0.22,-0.203L94.994,88.771C95.115,88.803 95.108,90.257 95.108,90.257 95.056,91.076 94.774,91.888 94.308,92.565 94.308,92.565 93.364,93.691 93.176,93.612"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"/>
</group>
</group>
</vector>
@@ -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="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
@@ -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="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 442 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 B

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame --> Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/ic_launcher_background</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your
+1 -1
View File
@@ -6,7 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.0.2' classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
+2 -3
View File
@@ -13,9 +13,8 @@ const notificationId = 0;
Future<void> main() async { Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
// TODO: change the default flutter icon to my own.
const AndroidInitializationSettings initializationSettingsAndroid = const AndroidInitializationSettings initializationSettingsAndroid =
AndroidInitializationSettings('@mipmap/ic_launcher'); AndroidInitializationSettings('@drawable/ic_notification');
const InitializationSettings initializationSettings = const InitializationSettings initializationSettings =
InitializationSettings(android: initializationSettingsAndroid); InitializationSettings(android: initializationSettingsAndroid);
await flutterLocalNotificationsPlugin.initialize(initializationSettings, await flutterLocalNotificationsPlugin.initialize(initializationSettings,
@@ -39,7 +38,7 @@ class LyricsGrabbr extends StatelessWidget {
return MaterialApp( return MaterialApp(
title: 'Lyrics Grabbr', title: 'Lyrics Grabbr',
theme: ThemeData( theme: ThemeData(
primarySwatch: Colors.blue, primarySwatch: Colors.purple,
), ),
home: const HomePage(title: 'Lyrics Grabbr'), home: const HomePage(title: 'Lyrics Grabbr'),
); );