Android - Adaptive icon wired on Huawei devices

304 Views Asked by At

I am using adaptive icon in my app with two .png files as background and foreground.

this a normally look

It looks good on emulator and my phone, but when I install it to a Huawei device (EMUI/Harmony), it turns into square shape weirdly with both layers scale to the same size and no adaptive icon effect.

.png files are 512x512 px. (is this a problem?)


my adaptive icon xml:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/..." />
    <foreground android:drawable="@drawable/..." />
</adaptive-icon>

my androidmanifest.xml:

...
<application
        android:icon="@drawable/adaptive"
        android:roundIcon="@drawable/adaptive"
        ...
           >
...


The default icon and my app icon, they are both adaptive.

adaptive icon

but, this is only happens in the launcher, in other lists, it is round masked.


huawei app's icon, they are not adaptive and not masked.

huawei's app icon


How should I fix it? Anyone know? Thx

0

There are 0 best solutions below