Android how to change the application icon

This world is a breath of forbearance, the wind is calm and the waves are calm, taking a step back and the sky is broad; forbearance, everything can be eliminated. Forbearance is to deal with and resolve, and use wisdom to turn big things into small things. There is joy and sadness in life, and there is bitterness and sweetness in life. No matter how big the pain is, if you forget it after you sleep, you will be exhausted if you keep carrying yesterday. Only by walking and forgetting can you feel every happiness.

ISO and android application icons

IOS图: :
Insert picture description here
Android图(1.1)(Huawei 10.0)
Insert picture description here
Android图(1.2):(Test machine 6.0)

Insert picture description here
Android图(1.3):(Test machine 8.0)
Insert picture description here

New Project

After creating the project, open the app/build.gradle file and check to make sure that the targetSdkVersion has been specified to 26 or higher, as 示例图(2.1)shown:

targetSdkVersion = 26 refers to android8.0

示例图(2.1):
Insert picture description here
Why should it be above Android8.0 (targetSdkVersion = 26)?

Starting from the Android 8.0 system, application icons are divided into two layers: the foreground layer and the background layer. In other words, when we design the application icon, we need to separate the foreground and the background. The foreground is used to display the logo of the application icon, and the background is used to set off the logo of the application icon. It should be noted that the background layer is only allowed to define colors and textures, but not shapes.

Start adaptation

Window system: ctrl + Shift + A input image Asset

Insert picture description here
After opening:
Insert picture description here
save: directly finfsh;
Insert picture description here

Change the default icon

Change icon:
Insert picture description here
Here are the things to note:

After Android8.0,

The picture selected by default is in mipmap-anydpi-v26,

mipmap-anydpi-v26 refers to drawable-24,

The default saved address is in drawable,

So you need to manually replace the foreground layer in the drawable with the corresponding icon

Simple and rude operation:

Copy ic_launcher_foreground.xml under drawable to drawable-24
Android
效果图(3.1) .:
Insert picture description here

Replace with letters

Insert picture description here

  • Red box: the default setting is font
  • Yellow box: font color
  • Blue box: default font

Remember to copy ic_launcher_foreground.xml under drawable to drawable-24.

效果图(3.2):
Insert picture description here

Change the background color of the application icon

Insert picture description here
效果图(3.3):
Insert picture description here

Set the corresponding version icon

Insert picture description here

Just take everyone to test so many, I feel that this article has helped you, you might as well pay attention and like it~

Guess you like

Origin blog.csdn.net/weixin_44819566/article/details/112533812