Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a themed monochrome icon for Material You

How would I implement a monochrome icon like other google apps so that it matches the dynamic colours picked by Material You?

like image 342
user14678216 Avatar asked Jan 26 '26 15:01

user14678216


1 Answers

Open your app icon and add the monochrome android:drawable attribute to the <adaptive-icon> element. For example, in res/mipmap-anydpi-v26/ic_launcher.xml:

<adaptive-icon >
    <background android:drawable="..." />
    <foreground android:drawable="..." />
    <monochrome android:drawable="@drawable/mymonochromeicon" />
</adaptive-icon>

If your try this and it does not work then you need to remove the android:roundIcon element from your AndroidManifest.xml, or, alternatively, also add the <monochrome android:drawable="@drawable/mymonochromeicon"/> tag to your round icon.

Android Studio might give a warning saying Element monochrome is not allowed here however we can ignore this.

like image 80
user14678216 Avatar answered Jan 28 '26 04:01

user14678216



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!