1
votes

I created one project in android studio, android studio didn't create drawable folder density wise as like it used to drawable-hdpi, drawable-mdpi etc. It created mipmap-hdpi, mipmap-mdpi etc.

I read https://stackoverflow.com/a/28065664/2455259 mipmap directory is for launcher icons.

Any other drawable assets you use should be placed in the relevant drawable folders as before.

Then why Android Studio stopped to create drawable folder as like before ? Is it no longer recommended approach to put app resources in drawables ?

2

2 Answers

4
votes

It wants you to create them when you need them, you can create one by right clicking on the res folder and then click on add new resource directory, select the drawable as the resource type and then from the list of available qualifiers chose density and then the >> button, then select the density you want.

enter image description here I think a reason why it was removed is for consistency because density is just one of the many qualifiers you can add to a resource file.

It also makes the folder structure neat, because you might not be using all the drawable folders.

The reason why it created the mipmap-hdpi, mipmap-mdpi folders is because there is already a file in it which is the default launcher icon for a new app, if there was no item in it it would not have created them.

2
votes

The mipmap folder is used for icons only. The other resources have to be placed in correspond drawables' folders. It is needed for better icon rendering.