maui appicon strange scaling on android

yueyinqiu 21 Reputation points

Someone else have the same question here but no answers, so I created a repository to make it more clear.

Have I misused it or it's a true problem? Thanks in advance.

A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,056 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 37,506 Reputation points Microsoft Vendor


    You could find the following content from this documentation: Change a .NET MAUI app icon.

    Adaptive launcher icons are composed icons, using a background layer and a foreground layer, and an optional scaling value. For more information, see the Composed icon section. If the composed icon is defined, by specifying the ForegroundFile attribute, an adaptive launcher icon will be generated. The following XML demonstrates defining an icon that is used as an adaptive launcher icon:

           <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" ForegroundScale="0.65" Color="#512BD4" />  

    Therefore, you could use the <MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundScale="0.4" Color="#fff" /> for Android platform to set the same effect as Xamarin.Android.

    Best Regards,

    Alec Liu.

    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