dotnet / dotnet/maui

Add support for controlling the "compat" app icon shape

Open
#11,293 1 comment 2 reactions 0 assignees View on GitHub
area-single-project proposal/open
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
296

Description

### Description

In Android 8.0 (API 26), the OS added support for adaptive icons. Resizetizer handles this just fine, however when it generates the backwards compat icon, it is just a square - or more specifically it is just drawing the background as is.

The Android 8.0 OS has some options:

![image](https://user-images.githubusercontent.com/1096616/201414890-4d1b6b7a-dd98-4c78-b505-9af05c2e7603.png)

But for older version of the OS, the developer is responsible for generating the "shape". For example, in Android Studio:

![image](https://user-images.githubusercontent.com/1096616/201415809-2f7f29b2-1967-42eb-bccb-9a6ca90dbd1f.png)

As you can see, there is both a round icon and a legacy icon. We already have the round *adaptive* icon, but still need to add the legacy versions of both the actual round image and then the shaped image (square - current, squircle, rounded square, circle)

There is also an app that can be used to test many variations: https://github.com/nickbutcher/AdaptiveIconPlayground

In summary, we have:

* [x] Adaptive shaped
* [x] Adaptive round
* [x] Legacy none

We are missing:

* [ ] Legacy round
* [ ] Legacy shaped (square, squircle, circle, rounded square)
* [ ] Legacy alternate shaped (vertical, horizontal)

### Public API Changes

Maybe all we need is an optional parameter on ``

This would then be a choice of a few things:

* None (current and default)
* Square
* Circle
* Rounded Square
* Squircle
* Vertical
* Horizontal

### Intended Use-Case

More things to support typical scenarios.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the Resizetizer path that generates backward-compatible icons and review how the MauiIcon Shape API is defined. Compare the current legacy output with the requested round, shaped, and alternate-shaped variants; done means the supported choices generate the corresponding legacy icons while preserving the current default.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
build-system, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.