How to Change the Launcher Logo of an App in Android Studio

How do you change the launcher logo of an app in Android Studio?

Look in the application's AndroidManifest.xml file for the <application> tag.

This application tag has an android:icon attribute, which is usually @drawable/ic_launcher.
The value here is the name of the launcher icon file. If the value is @drawable/ic_launcher, then the name of the icon is ic_launcher.png.

Find this icon in your resource folders (res/mipmap-mdpi, res/mipmap-hdpi, etc.) and replace it.

A note on mipmap resources: If your launcher icon is currently in drawable folders such as res/drawable-hdpi, you should move them to the mipmap equivalents (e.g. res/mipmap-hdpi). Android will better preserve the resolution of drawables in the mipmap folder for display in launcher applications.

Android Studio note: If you are using Android Studio you can let studio place the drawables in the correct place for you. Simply right click on your application module and click New -> Image Asset.

For the icon type select either "Launcher Icons (Legacy Only)" for flat PNG files or "Launcher Icons (Adaptive and Legacy)" if you also want to generate an adaptive icon for API 26+ devices.

How to change Android icon everywhere?

I suggest to change launcher icon using asset studio in Android Studio. You have information how to do it here in official documentation. Also it's good to use vector image and add it through Asset studio.

Also, be aware that after adding new icon, launcher on Your phone could have it cashed, so restart Launcher app or You phone (depends on what launcher You use, for example Nova Launcher have restart option in settings).

When designing icon stick to official guidelines to make Your icon adaptive.

why doesn't it change the launcher icon?

In short:

  • You are changing the legacy launcher PNG, but you are viewing your app on a newer device which uses adaptive launcher icons.

Android API 26 introduced the concept of Adaptive icons. Instead of supplying the icon and background in one PNG (per DPI size), we now supply the icon as a "foreground" image, and the "background" resource seperately.

This allows the launcher app to choose whichever shape of background it is configured for, and use that with your icon overlaid.

For backwards compatibility, we still supply to usual PNG, which will be used on pre-API 26 devices. This is what you are changing, but the changes will not be visible on the device you are testing with as it is displaying adaptive icons.

Your change would be visible on an older device.


To use these new launchers, go to Android Studio menu File... New... Image Assets.

Choose "Launcher Icons (Adaptive and Legacy)" - this will show you the new UI giving you options to change the foreground, background and legacy resources.


Note that if you don't supply any of the adaptive resources, API 26-27 will display your legacy icon as you designed it.

API 28 changes that and your legacy icon will be shrunk by the launcher, and placed inside a default white background to match the style chosen. This would look as if you had chosen a white background layer and a smaller foreground layer in the adaptive wizard.


Here's the info from the Android Developer docs:

  • Adaptive icons

How to change icon of app in android studio ? I replaced the mipmap folder by new ic_launcher but still not showing the icon i set

The way to change the app icon changed a long time ago. In android studio goto

File > New > Image Asset

Now you will be able to create a new icon for your app.

Set icon for Android application

If you intend on your application being available on a large range of devices, you should place your application icon into the different res/drawable... folders provided. In each of these folders, you should include a 48dp sized icon:

  • drawable-ldpi (120 dpi, Low density screen) - 36px x 36px
  • drawable-mdpi (160 dpi, Medium density screen) - 48px x 48px
  • drawable-hdpi (240 dpi, High density screen) - 72px x 72px
  • drawable-xhdpi (320 dpi, Extra-high density screen) - 96px x 96px
  • drawable-xxhdpi (480 dpi, Extra-extra-high density screen) - 144px x 144px
  • drawable-xxxhdpi (640 dpi, Extra-extra-extra-high density screen) - 192px x 192px

You may then define the icon in your AndroidManifest.xml file as such:

<application android:icon="@drawable/icon_name" android:label="@string/app_name" >
....
</application>


Related Topics



Leave a reply



Submit