How to set new Icon in Xamarin Mobile Apps ?

Jerry Lipan 916 Reputation points
2022-05-26T14:19:02.163+00:00

Hi,

I'm a newbies in Xamarin App Development with Visual Studio. So far, I've this in Android

205859-screenshot-20220526-221359-one-ui-home.jpg

How to set new Icon for this SFA ?

Please help

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 26,446 Reputation points Microsoft Vendor
    2022-05-27T06:24:58.65+00:00

    Hello,

    On Android platform, the Xamarin icon named icon.png is under mipmap-mdpi, mipmap-xhdpi, mipmap-xxhdpi, mipmap-xxxhdpi folders now. An easy way to change the icon is to replace the icon.png : design a set of icons in different sizes, and put each icon into the corresponding folder, make sure each icon is named icon.png, then the old icon file will be replaced.
    The launcher-foreground.png needs to be updated as well.

    A set of six generalized densities:
    ldpi (low) ~120dpi
    mdpi (medium) ~160dpi
    hdpi (high) ~240dpi
    xhdpi (extra-high) ~320dpi
    xxhdpi (extra-extra-high) ~480dpi
    xxxhdpi (extra-extra-extra-high) ~640dpi

    If you change the icon file name, please update the name in icon.xml and icon_round.xml, and update the Icon reference in MainActivity.cs.

    On iOS platform, refer to https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/app-icons?tabs=macos

    Pay attention to uninstalling the app and delete obj/bin to check the effect of the new icon.

    Best Regards,
    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful