Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add monochrome version of the Android adaptive app icon to Android Studio

Tags:

android

I am trying to add themed adaptive icon to my existing Android application. I am following the steps explained here: https://developer.android.com/develop/ui/views/launch/icon_design_adaptive

However I am struggling with the part where I need to add the monochrome file to the ic_launcher.xml file:

 <monochrome android:drawable="@drawable/ic_launcher_monochrome" />

How do I add the actual monochrome image to the project? I have created a black and white .png file but not to sure where to put it.

like image 848
Ace Ventura Avatar asked Dec 19 '25 16:12

Ace Ventura


1 Answers

I created a monochrome icon using Photos app of Windows from each original icon density and put it aside in the same folder. For example: D:\Users\ronen\StudioProjects\AutoVolumeFree\app\src\main\res\mipmap-hdpi

And the ic_launcher.xml:

    <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
    <monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
</adaptive-icon>
like image 68
Ronen Festinger Avatar answered Dec 21 '25 04:12

Ronen Festinger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!