Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Usage of mipmap launcher icons before Android 4.2?

Tags:

I'm using Android Asset Studio to generate my launcher icon and I've seen that the output is now creating mipmap folders instead of drawable folders.

Since mipmap support has been added since Android 4.2 and my application is targeting ICS 4.0.3 (API 15). Is it safe to use them ? and then don't have any ic_launcher icon in drawables folders ?

update I confirm it's working fine. You can only use mipmap folders for Application icon

like image 821
gbero Avatar asked Jan 21 '15 13:01

gbero


People also ask

What does mipmap files represent in Android system?

The mipmap folders are for placing your app/launcher icons (which are shown on the homescreen) in only. Any other drawable assets you use should be placed in the relevant drawable folders as before.

How do I add icons to mipmap Android?

Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Further follow the path to reach the desired folder to add icon (app → res → mipmap). Step 3 - Add you app icon. You can just simply copy and paste the image in mipmap folder.

What is mipmap used for?

Originally Answered: what is mipmap in android ? Mipmap is basically used for keeping all the icons that you would be using in your application. 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.

What is difference between drawable and mipmap?

If you are building different versions of your app for different densities, you should know about the mipmap resource directory. This is exactly like normal drawable folder resources, except it does not participate in density stripping while resource optimisation when creating different target apks.


2 Answers

Mipmap folder support was added in Android SDK 11 or Honeycomb. This means that you can use the Mipmap folder from Android version 3.0 and above, including version 4.2. This is most official documentation I can find about this topic.

like image 60
Hassaan Avatar answered Sep 19 '22 00:09

Hassaan


I was not able to find official documentation that stated this will work on Android versions older than 4.2. However these mipmap resource folders started appearing in apk files that shipped with Honeycomb, so anything newer than that will have support it would be safe to assume.

I have tested an app using only mipmaps for the launcher icon on physical devices and had no issues on versions 4.0.3 and higher. I have not tested on Honeycomb, Gingerbread and older.

For more information about mipmaps in Android Studio, take a look at this site:

https://androidbycode.wordpress.com/2015/02/14/goodbye-launcher-drawables-hello-mipmaps/

like image 30
BrentM Avatar answered Sep 22 '22 00:09

BrentM