Force adaptive icon to be square (Square)

The best icon format for my app is the rounded square, however, in api 26 and 27 we know that android uses a predefined adaptive icon (always in circular format) or transforms a non-adaptive icon (circle with white space and small real icon).

After many tests and searches on the internet, I was convinced that it should produce a circular icon, but luckily I noticed that the Facebook icon in these apis maintains its default (rounded square of normal size).

How can I implement this in my subscription?

Author: ramaral, 2018-04-17

1 answers

If your application declares in targetSdkVersion API26 or higher cannot do anything.

The way the icon is displayed depends on the mask applied by the application "Launcher". It can be different from device to device and not "Always in circular format" as you said.

An adaptive icon consists of two layers, one representing the background and the other foreground.
The application "Launcher " applies a mask (square, round or otherwise) over these layers thus determining the final look of the icon.

insert the description of the image here

Image Source: Android Guide - Adaptive Icons

 1
Author: ramaral, 2018-04-17 16:32:21