最佳答案
基于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.
与您可以明显看到其形状的 png 文件不同,前景层文件 (ic_***_foreground.xml) 被解释为 circle
或 squircle
基于您正在查看的设备提供的掩码。因此,您可以说该文件既是您的方圆又是圆角正方形
。
关于Android Studio - 配置图像资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57293924/