TLDR; Add adaptive app icon of your android app

Weather you’re building using native android (kotlin or java), or react-native and even flutter use this technique to add adaptive app icon for your android app.

Open your android project in Android Studio. Go to /app/res/drawable folder and right cli…


This content originally appeared on DEV Community and was authored by Chaudhry Talha

Weather you're building using native android (kotlin or java), or react-native and even flutter use this technique to add adaptive app icon for your android app.

Open your android project in Android Studio. Go to /app/res/drawable folder and right click New -> Image Asset

o to app/res/drawable folder and right click, then select new and then image asset

You'll see an Asset Studio window will open:

Asset Studio window

Here is the quick info about the options you have in this window:

  • Icon type depending on the type of app you're building it'll be generating the assets. Like if you're building an android app for the TV then it'll have it's own icon sizes. As I'm creating for mobile app so I'll keep the options selected Launched Icons (Adaptive and Legacy)

  • As the name is already written ic_launcher which is the name of the icon Android Studio has already set by default. Keep it as it is

  • Next, you have three tabs, Foreground Layer, Background Layer and Options.
    As the names suggest we're going to have a background layer which can be a colour or an image and same goes for foreground layer.
    We'll keep the Options as it is, but you can explore it to see what options suits for your use-case.

Below is the icon that I'll be adding:

Moonect Logo

I've select the above PNG as foreground layer and adjusted the Resize option to make sure the layer is within the circles in the Preview

Asset Studio Foreground Layer

For the background layer I'll be adding white color.

Asset Studio Background Layer

After that press Next and it'll show you which files will be created, overwritten or removed. As I kept the name same i.e. ic_launcher so this is going to replace the current default Android app icon, so I'll just press Finish

Asset Studio Final Review

It's completely safe to add all the files it has created to Git.

Android Studio Git

For my app icon, there were 33 changes in the git.

Github Preview

Clean and run the project and you'll see a pixel perfect logo, adaptive to all android phones.


This content originally appeared on DEV Community and was authored by Chaudhry Talha


Print Share Comment Cite Upload Translate Updates
APA

Chaudhry Talha | Sciencx (2024-08-10T16:51:42+00:00) TLDR; Add adaptive app icon of your android app. Retrieved from https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/

MLA
" » TLDR; Add adaptive app icon of your android app." Chaudhry Talha | Sciencx - Saturday August 10, 2024, https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/
HARVARD
Chaudhry Talha | Sciencx Saturday August 10, 2024 » TLDR; Add adaptive app icon of your android app., viewed ,<https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/>
VANCOUVER
Chaudhry Talha | Sciencx - » TLDR; Add adaptive app icon of your android app. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/
CHICAGO
" » TLDR; Add adaptive app icon of your android app." Chaudhry Talha | Sciencx - Accessed . https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/
IEEE
" » TLDR; Add adaptive app icon of your android app." Chaudhry Talha | Sciencx [Online]. Available: https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/. [Accessed: ]
rf:citation
» TLDR; Add adaptive app icon of your android app | Chaudhry Talha | Sciencx | https://www.scien.cx/2024/08/10/tldr-add-adaptive-app-icon-of-your-android-app/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.