SerialTest icon indicating copy to clipboard operation
SerialTest copied to clipboard

Add monochrome icon

Open xmha97 opened this issue 2 years ago • 7 comments

Please support the Android 13 "Themed App Icons" feature. #AdaptiveIcon

Screenshot_2023-06-12-04-30-39-146_de.mm20.launcher2.release.jpg

xmha97 avatar Jun 12 '23 01:06 xmha97

I found that some of the apps you listed don't have a specific configuration for the monochrome icon, and I don't know why the OS cannot change the icon into a monochrome one while others can. It will be much helpful if you could provide some information about it.

wh201906 avatar Jun 12 '23 07:06 wh201906

For testing the "Themed icons" feature, you need an Android 13 emulator (like AVD or Genymotion) or device (except Xiaomi and Huawei phones)

On the "Wallpaper and style" settings, you can enable the "Themed icons" option.

activate-themed-icons-1.png

If your phone/emulator is Android 13 but it doesn't have this option, you have to install a launcher that supports this feature. (like Kvaesitso)

https://github.com/MM2-0/Kvaesitso/releases

Now go to launcher settings and enable this feature.

Screenshot_2023-06-12-19-52-25-040_de.mm20.launcher2.release.jpg

Screenshot_2023-06-12-19-52-44-100_de.mm20.launcher2.release.jpg

(Sorry for my bad English)

xmha97 avatar Jun 12 '23 16:06 xmha97

It will be much helpful if you could provide some information about it.

@wh201906

Here is the official Android developer documentation on the subject

sebastien46 avatar Nov 26 '23 10:11 sebastien46

@sebastien46 Thanks. It's useful.

wh201906 avatar Nov 26 '23 12:11 wh201906

@wh201906 here's a mockup I made using inkscape: ic_launcher_monochrome

I also saw that you didn't use the vector file for drawing the regular / adaptive app icon, so here's a version of that:

ic_launcher_foreground

I would've tried making a PR but the QT Creator VCS tree is really too confusing for me 😄

I found that some of the apps you listed don't have a specific configuration for the monochrome icon, and I don't know why the OS cannot change the icon into a monochrome one while others can. It will be much helpful if you could provide some information about it.

To answer your original question:

  • The launcher gets the monochrome / adaptive drawables from the ic_launcher.xml / ic_launcher_round.xml XML files in the mipmap-anydpi-v26 folder:
<?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"/> #for background, you can also use @color/...
    <foreground android:drawable="@drawable/ic_launcher_foreground"/>
    <monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>
  • Then, these get their VectorDrawables in the drawable folder

  • Finally, the app's icons are set in AndroidManifest.xml:

android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"

sebastien46 avatar Dec 05 '23 05:12 sebastien46

@sebastien46 Thank you so much! I'll try the information you provided.

wh201906 avatar Dec 05 '23 12:12 wh201906

I finally got an Android 14 device to test it. This is implemented in commit da9f2caaf14dba0fd583491605c2ced32e29b741 and it's working on my device.

wh201906 avatar Jan 27 '24 15:01 wh201906

I finally got an Android 14 device to test it. This is implemented in commit da9f2ca and it's working on my device.

When it'll implemented in new update

saltsoftdrink avatar Feb 19 '24 10:02 saltsoftdrink

@wh201906

saltsoftdrink avatar Feb 26 '24 07:02 saltsoftdrink

When it'll implemented in new update

Ah sorry I didn't get the notification of this reply. I'll release it in around 1~2 weeks.

wh201906 avatar Feb 26 '24 07:02 wh201906

When it'll implemented in new update

Ah sorry I didn't get the notification of this reply. I'll release it in around 1~2 weeks.

Thanks Man!

saltsoftdrink avatar Feb 26 '24 08:02 saltsoftdrink

@saltsoftdrink The new release is out, but it takes some time for F-Droid to build it.

wh201906 avatar Mar 10 '24 03:03 wh201906

@saltsoftdrink The new release is out, but it takes some time for F-Droid to build it.

Upload in release section of github

saltsoftdrink avatar Mar 10 '24 04:03 saltsoftdrink

The apks of older releases are also from F-Droid. I have to wait for the apk from F-Droid otherwise the apk signature will change.

wh201906 avatar Mar 10 '24 04:03 wh201906

The apk can be downloaded on F-Droid, SourceForge and GitHub Releases

wh201906 avatar Mar 14 '24 14:03 wh201906