maui icon indicating copy to clipboard operation
maui copied to clipboard

Add support for controlling the "compat" app icon shape

Open mattleibow opened this issue 1 year ago • 0 comments

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

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

image

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 <MauiIcon Shape="xxx" />

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.

mattleibow avatar Nov 11 '22 19:11 mattleibow