Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Theare aren't different drawable folders on Android Studio

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

like image 515
Alessio Trecani Avatar asked Dec 05 '22 03:12

Alessio Trecani


2 Answers

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

like image 144
Tspoon Avatar answered Mar 08 '23 18:03

Tspoon


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

like image 44
Amer Mograbi Avatar answered Mar 08 '23 17:03

Amer Mograbi