2

I have a PNG icon file named icon.png and I want to use it as my Xamarin.Form app's icon. So here's what I've done -

  • Changed Application Icon from Android Options
  • Changed Icon = "@mipmap/icon" in MainActivity.cs file

Still it was showing the default Xamarin logo icon. Then I did the followings -

  • Changed <foreground android:drawable="@mipmap/icon" /> in icon.xml file
  • Changed <foreground android:drawable="@mipmap/icon" /> in icon_round.xml file

Now the default android icon is showing but not my icon. What to do? Please help.

I tried matching all the icons dimension to the default icons dimension, also tried the followings - 36px for idpi, 48px for mdpi, 72px for hdpi, 96px for xhdpi, 144px for xxhdpi

I also tried restarting VS, rebuilding the entire solution, clearing cache and temp files.

Mahmudul Hasan
  • 798
  • 11
  • 35

1 Answers1

6

I have checked the code sample. Do the changes below it would change the application icon.

Change the icon in MainActivity:

 Icon = "@drawable/logo"

Change the Application icon in Android Manifest:

enter image description here

Sceenshot:

enter image description here

Wendy Zang - MSFT
  • 10,509
  • 1
  • 7
  • 17