Skip to content

Generate the Android 7 round app icon#23276

Merged
rmarinho merged 4 commits into
mainfrom
dev/android-round-icon
Jul 29, 2024
Merged

Generate the Android 7 round app icon#23276
rmarinho merged 4 commits into
mainfrom
dev/android-round-icon

Conversation

@mattleibow

Copy link
Copy Markdown
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
@github-actions github-actions Bot force-pushed the dev/android-round-icon branch from 77f0878 to 79d6d02 Compare July 10, 2024 10:52
@mattleibow

Copy link
Copy Markdown
Member Author

/rebase

@github-actions github-actions Bot force-pushed the dev/android-round-icon branch from 52fbcd3 to 40c4e35 Compare July 23, 2024 22:32
Comment on lines +86 to +91
if (GetClipPath(dpi, canvasSize, unscaledCanvasSize) is { } clipPath)
{
canvas.Clear(SKColors.Transparent);

canvas.ClipPath(clipPath, antialias: true);
}

Copy link
Copy Markdown
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
Copy Markdown
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
@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