How to change application icon in Xamarin.Forms?

Szandi picture Szandi · Jun 21, 2016 · Viewed 85.5k times · Source

I replaced all the images everywhere (by this I mean in drawable folders and all Windows Assets folders and iOS Resources folder), but it still shows me the default Xamarin icon for the app. I tried this code, too, but it doesn't seem to work either. Can someone tell me the solution?

[assembly: Application(Icon = "@drawable/icon")]

Answer

Victor Madurga picture Victor Madurga · Jun 22, 2016

For Android try to set the icon app like this:

[Activity(Icon = "@drawable/icon")]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
{
     .....
}

Make sure that you have changed all the icon images on all drawable folders ( drawable, drawable-hdpi, drawable-xhdpi and drawable-xxhdpi ).

For iOS I like set the app icons and splash screen with Asset Catalogs, here you can find a guide to how to use it:

https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/app-icons/