How to change application icon in Xamarin.Forms?

前端 未结 8 2076
日久生厌
日久生厌 2020-12-14 06:28

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

8条回答
  •  囚心锁ツ
    2020-12-14 07:04

    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/

提交回复
热议问题