4

I m trying to integrate different image size in my app but the problem is that in Android Studio there are not the drawable-Idpi,mdpi,hdpi,xhdpi folders. I ve checked already other threads and the answers were that I just need to skip into the Project view instead of the Android one. But the results are the same. There is just one generale folder called drawable

enter image description here

enter image description here

And if I try to add another resource folders the drawable is missing.

enter image description here

Alessio Trecani
  • 713
  • 2
  • 10
  • 25

3 Answers3

14

Just create a new folder:

Right click 'res' folder --> New --> Android Resource Directory.

In the wizard, select drawable as 'Resource Type'. And then 'Density' from the resource qualifiers.

With regard to the 'mipmaps' folders, Android now prefers app icons in these folders because it can use an icon in a different density to the screen density.

More about mipmaps here: http://android-developers.blogspot.de/2014/10/getting-your-apps-ready-for-nexus-6-and.html

Tspoon
  • 3,670
  • 1
  • 26
  • 33
2

I had the same problem before. I fixed it by downloading an icon that i wanted from http://www.icons4android.com/

now this site provides all the drawable-Idpi,mdpi,hdpi,xhdpi folders for download for each icon they have, I just highlighted all the drawable-Idpi,mdpi,hdpi,xhdpi folders, copied them, and then pasted them to android studio res folder. (I did this in android view)

I hope this helps

Amer Mograbi
  • 489
  • 1
  • 6
  • 18
0

You can create folder same as drawable, drawable-hdpi, mdpi, xxhdpi ... etc

Its look like

enter image description here

But when you see source code using

enter image description here

enter image description here

Add images in draweble its ask you in which folder you want to add(copy n past images in studio)

enter image description here

You can directly creat folder in res its also work...

Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177