Drawable or Mipmap?? What’s the difference?

Asked

Viewed 3,895 times

5

Since version 1.1 of android studio appeared a new folder called mipmap with the same features of drawable. What is the usefulness of this new folder?

2 answers

4


The mipmap folder is exclusively for placing icons that will be used in the application.

Here is an explanation from Google about this case:

It’s best Practice to place your app icons in mipmap-folders (not the drawable- folders) because they are used at resolutions Different from the device’s Current Density. For example, an xxxhdpi app icon can be used on the Launcher for an xxhdpi device.

I hope I’ve helped.

1

They have been changed to mipmaps, leaving drawable nomenclature only for PNG, JPEG, GIF or image files, 9-Patch, and XML files that describe Drawable shapes or Drawable objects that contain multiple states (normal, pressed, or focused).

In short, mipmaps are used for app launcher icons. The Android system retains the features in this folder (and specific density folders such as mipmap-xxxhdpi), regardless of the screen resolution of the device where the application is installed. This behavior allows applications to choose the best icon/resolution for their application to display on the home screen. For more information on using mipmap folders, see Managing Icon Launcher as mipmap features.

https://developer.android.com/guide/topics/resources/drawable-resource.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.