Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate the Android 7 round app icon #23276

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Generate the Android 7 round app icon #23276

merged 4 commits into from
Jul 29, 2024

Conversation

mattleibow
Copy link
Member

Description of Change

This PR fixes the case where Android 7 is very different:

This means that specifically for Android 7, the round icons are PNG files but for Android 8 they are adaptive icons.

Issues Fixed

Fixes #23178

@mattleibow mattleibow requested a review from a team as a code owner June 26, 2024 15:56
@PureWeen PureWeen added the area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer label Jun 28, 2024
@mattleibow
Copy link
Member Author

/rebase

Comment on lines +86 to +91
if (GetClipPath(dpi, canvasSize, unscaledCanvasSize) is { } clipPath)
{
canvas.Clear(SKColors.Transparent);

canvas.ClipPath(clipPath, antialias: true);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the real code change, if there is a clip path attached to the "dpi" then we clip to that first.

Comment on lines +70 to +75
// legacy round for Android 7
new DpiPath("mipmap-mdpi", 1.0m, "_round", size: new SKSize(48, 48), clip: ClipShape.Circle),
new DpiPath("mipmap-hdpi", 1.5m, "_round", size: new SKSize(48, 48), clip: ClipShape.Circle),
new DpiPath("mipmap-xhdpi", 2.0m, "_round", size: new SKSize(48, 48), clip: ClipShape.Circle),
new DpiPath("mipmap-xxhdpi", 3.0m, "_round", size: new SKSize(48, 48), clip: ClipShape.Circle),
new DpiPath("mipmap-xxxhdpi", 4.0m, "_round", size: new SKSize(48, 48), clip: ClipShape.Circle),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just these have a clip shape.

@rmarinho rmarinho merged commit 44a47d5 into main Jul 29, 2024
97 checks passed
@rmarinho rmarinho deleted the dev/android-round-icon branch July 29, 2024 13:13
@samhouts samhouts added fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-8.0.80 and removed fixed-in-net9.0-nightly This may be available in a nightly release! labels Aug 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer fixed-in-8.0.80 fixed-in-net9.0-nightly This may be available in a nightly release!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppIcon not displayed for Android 7
4 participants