Reputation: 3796
In Android there are 2 ways for specifying launcher icons (the app icon so to speak) :
'old' way
Specifying different png files in the mipmap folder typically named ic_launcher.png but the name can be set via android:icon="@mipmap/appicon_android"
Adaptive icons
Referring to https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive. Here the icon consists out of front and background drawables (refer to the above mentioned link for the complete description). Android says:
Next you must create alternative drawable resources in your app for use with Android 8.0 (API level 26) in res/mipmap-anydpi-v26/ic_launcher.xml. You can then use the element to define the foreground and background layer drawables for your icons.
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
If my app has :
minSdkVersion 26
targetSdkVersion 29
Should the 'old' way png files still be included or is it enough only to have the adaptive icons present?
Upvotes: 2
Views: 2099
Reputation: 38243
is it enough only to have the adaptive icons present?
Yes.
You must only account for your min SDK version. If your min SDK version is above API 21 you're free to use vector drawables instead of PNG.
Additional sources:
Upvotes: 6