How can I create Image folder resource in android

139 Views Asked by At

How can I do like the below image in IntelliJ or Android Studio.

Image folder for different dpi (hdpi, mdpi, xhdpi, xxhdpi) contain in the same folder.

enter image description here

2

There are 2 best solutions below

0
On BEST ANSWER

Its more like android studio is smart enough to categorize the resources that you already have and present to you the way you see it. However it is still the same as having the below directory structure and arranging you image resources in them.

                 MyProject/
                  res/
                    drawable-xhdpi/
                      awesomeimage.png
                    drawable-hdpi/
                      awesomeimage.png
                    drawable-mdpi/
                      awesomeimage.png
                    drawable-ldpi/
                      awesomeimage.png

Here is a good read https://mobilechild.wordpress.com/2015/05/10/120/

0
On

if you have (hdpi, mdpi, xhdpi, xxhdpi) folder's in your res folder and copy of each image in diffrent sizes with same name in related folder then you can see this structure.