Set Icon For Android Application

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>

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.

Android Studio app icon

you have to update both property of application tag in manifest file.

   android:icon="@mipmap/ic_launcher" <-- Change this one
android:roundIcon="@mipmap/ic_launcher_round" //<-- and this one

or you can remove

android:roundIcon="@mipmap/ic_launcher_round" //<-- and this one

ensure you have place all mipmap/drawable in correct place and for all dpi.

reach me if you have still problems.

Android change app icon

As Suke pointed I forgot posting the solution for this question. Sorry all.

After a lot of managements the solution was easy and it was the one google's one.

this link is where you can create all images for android project.

Go there and:

  • insert your image and select all features
  • download it
  • replace all image formats (xxhdpi, hdpi, ...) in your drawable-xxhdpi, drawable xhdpi,... and mipmap-xxhdpi, mipmap-xhdpi,... folders.
  • in manifest set the android:icon = "@drawable/myicon"

this is how I did it

hope it helps

What's the best way to create icon for an android app

Just get the icon as a jpg, then go to the mipmap folder, right click on it, click on new image asset, and after making suitable modifications (optional), click next, click finish. All the variants will be automatically generated.



Related Topics



Leave a reply



Submit