calcitem / Sanmill

Sanmill is an open-source, UCI-like Mill/Morris/Merrills/Mühle/Malom (and its variants) program with CUI, Flutter GUI and Qt GUI, sharing and freely distributing the code, tools and data needed to deliver this mill game. We do this because we are convinced that open software and open data are key ingredients to make rapid progress.
https://play.google.com/store/apps/details?id=com.calcitem.sanmill
GNU General Public License v3.0
143 stars 21 forks source link

[Feature Request] [Android] Themed / Monochrome App Icon #774

Open sebastien46 opened 7 months ago

sebastien46 commented 7 months ago

Is your feature request related to a problem? Please describe. I like my main Android menu being homogeneous & have all the icons be in the same theme

Describe the solution you'd like I would like to see the themed / monochrome app icon functionality for Android 13+ being implemented.

Describe alternatives you've considered Don't implement it. I respect the developers' choice.

Additional context Android 13 Announcement Android Developer Documentation

calcitem commented 7 months ago

I recently came across the tool, IconKitchen, which seems to be a fantastic resource for generating app icons. I am currently in the process of designing icons for a project and am very interested in utilizing IconKitchen for this purpose.

I have prepared the necessary design files and I'm wondering if I could simply generate the icons using IconKitchen and then directly load them into my project. Could you kindly confirm if this process would work seamlessly with IconKitchen? Additionally, if there are any specific file formats or preparations required before loading them into the tool, I would greatly appreciate your guidance on that.

Looking forward to your response and any tips you might have to streamline the icon creation process.

IconKitchen-Output.zip

sebastien46 commented 7 months ago

I recently came across the tool, IconKitchen, which seems to be a fantastic resource for generating app icons. I am currently in the process of designing icons for a project and am very interested in utilizing IconKitchen for this purpose.

I have prepared the necessary design files and I'm wondering if I could simply generate the icons using IconKitchen and then directly load them into my project. Could you kindly confirm if this process would work seamlessly with IconKitchen?

I honestly have no idea how well this tool would work since I've never used it before. Therefore, it is why I will explain the icon creation process below. However, I will look further into this tool & will tell you if it seems easier to use for this specific usecase.

Looking forward to your response and any tips you might have to streamline the icon creation process.

I know that for Themed / Monochrome app icons to work, you must first implement Adaptive Icons, which isn't the case for your project.

You need to create an ic_launcher.xml / ic_launcher_round.xml (for round icon) in src/main/res/mipmap-anydpi-v26, then it must look something like this inside of them:

<?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" /> // or @color
    <foreground android:drawable="@drawable/ic_launcher_foreground" /> // or @mipmap
    <monochrome android:drawable="@drawable/ic_launcher_monochrome" />

</adaptive-icon>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color
        name="ic_launcher_background"
        >hex_color</color>
</resources>

VectorDrawables can be created by importing them in Android Studio or by hand.

Mipmaps can either be made by hand then scaled down for each DPI level or can be created from a VectorDrawable using the Android Studio Image Asset Studio

To finish, you must only add android:roundIcon in AndroidManifest.xml (optional)