Skip to content

[Android] MauiIcon BaseSize and ForegroundScale doesn't work #7305

@janseris

Description

@janseris

Description

There is no way to preserve aspect ratio or to scale the icon inside the icon area.
My app icon looks awful due to the fact that it stretches somehow through the icon area (both stretched and cropped when not a square probably).

Simulation of the MauiIcon behavior:
Image
appicon
Result:
image

Setting BaseSize and ForegroundScale attributes on MauiIcon does nothing although the behavior is documented in https://docs.microsoft.com/en-us/dotnet/maui/user-interface/images/app-icons

Steps to Reproduce

<MauiIcon Include="Resources\appicon.png" ForegroundFile="Resources\appicon.png" >
	<BaseSize>32,32</BaseSize>
	<ForegroundScale>0.65</ForegroundScale>
</MauiIcon>

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-single-projectSplash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizerfixed-in-6.0.408Look for this fix in 6.0.408!platform/androids/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions