Search code examples
androidandroid-studiouiimageasset

Android Studio - Configure image asset


I create icons with Android Studio, but I can use only circle or square... Where I can find squircle and rounded square?

Screenshot


Solution

  • Based on the docs

    Android 8.0 (API level 26) introduces adaptive launcher icons, which can display a variety of shapes across different device models. For example, an adaptive launcher icon can display a circular shape on one OEM device, and display a squircle on another device. Each device OEM provides a mask, which the system then uses to render all adaptive icons with the same shape. Adaptive launcher icons are also used in shortcuts, the Settings app, sharing dialogs, and the overview screen.

    Unlike the png file that you can visibly see its shape, the foreground layer file (ic_***_foreground.xml) is intrepreted as circle or squircle based on the mask provide by the device you are viewing it from. Hence you can say the file is both your squircle and rounded squares.