Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Adaptive icons not working for Android in Xamarin.Forms app

$
0
0

I have a Google Pixel 2 with Android 9.0. My App is compiling against Android 8.1 Oreo, and the target version is also 8.1.

In my resource folder, I have the following:

resources/
    mipmap-anydpi-v26/
        ic_launcher.xml
        ic_launcher_round.xml
    mipmap-hdpi/
        ic_launcher.png
        ic_launcher_background.png
        ic_launcher_foreground.png
        ic_launcher_round.png
    mipmap-mdpi/
        etc...

mipmap-anydpi-v26/ic_launcher.xml looks like this:

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

And finally, in my Android manifest, I have

<application 
    android:label="MyApp" 
    android:icon="@mipmap/ic_launcher" 
    android:roundIcon="@mipmap/ic_launcher_round">
...
</application>

However, the app icon is always the ic_launcher.png icon, and it is inside of the 'circle' icon on my Pixel home screen (in other words, its not using the adaptive icons). Is this a bug? No matter what, I can't seem to fix this problem.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>