How should we use the mipmap folders added with Android 4.4?

I recently installed another Android SDK for Android Studio, SDK version 4.4 (API level 19) and after using it with my project I added a set of mipmap folders to the res project folder ( res/mipmap ).
I do not understand why and how to use them.

I read another question about this here on SO .
The answer to it said that:

The mipmap folders are intended only for hosting application icons. Any other disposable assets that you use must be placed in the appropriate as before.

According to this google blog blog :

It is best to place the icons of your applications in the mipmap folders - (and not in folders with the ability to draw), since they are used at a resolution different from the current density of devices.

I still do not understand the reason for this. Why can't we just put application icons in res/drawable ?

In addition, if only the application icon should be placed in the mipmap folder, how can I create other available resources and put them in drawable folders using the Studio Studio Apple setup wizard? (Right-click access in the project by selecting New> Image Attribute )

+4
android android-drawable android-4.4-kitkat mipmaps
source share
1 answer

Why can't we just put application icons in res / drawable folders?

Oh you can. Google does not recommend that all.

Quote from version 6.5 of my book :

While recoverable resources can be deleted during the packaging of the APK, for example, for Gradle for the Android split system to create special applications for specific applications, the mipmap resources are left alone, apparently

This is because launch icons can be pulled out of a bucket of higher density than the density of a conventional device, which is used for all other drawings. Putting them in the res/mipmap-*/ directories means that we will not accidentally get rid of them as part of optimizing the size of the APK.

(why they didn’t do it better, I have no idea)

How can I create other available resources and put them in drop-down folders using the Android Image Image Asset wizard? (Right-click access in the project, choose New> Activate Image)

The Image Asset wizard only places startup icons in the res/mipmap-*/ directories. If you select other types of icons, they will go into res/drawable-*/ . And, of course, the Image Asset wizard is not required per se.

+9
source share

All Articles