Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android studio change launcher icon

309

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.
Comment

PREVIOUS NEXT
Code Example
Java :: find maximum in array java 
Java :: matrice java 
Java :: java timer 
Java :: flutter java.lang.RuntimeException: Unable to instantiate activity ComponentInfo 
Java :: java iterator to stream 
Java :: android sqlite select query 
Java :: java read file 
Java :: boucles java 
Java :: how to convert primitive int to Integer in java 
Java :: dequeue in java 
Java :: java string to integer 
Java :: glide dependency 
Java :: java get number of months between two dates 
Java :: android sha1 key 
Java :: variables java 
Java :: how to clear text fields in java 
Java :: java.lang.ArrayIndexOutOfBoundsException 
Java :: how to round double to 2 decimal places java 
Java :: java read a line of input 
Java :: convert a int to string in java 
Java :: for java 
Java :: pyramid pattern program in java 
Java :: greater than sign in java 
Java :: read stream java 
Java :: java map merge example 
Java :: how to use do while loop in java 
Java :: java rename file 
Java :: how to put string in char array in java tutorialspoint 
Java :: getsource java 
Java :: how to add textview to listview in android 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =