At some point in an Android project you will need to import some drawables - be it toolbar icons, images, UI features - in res/drawable
directory. Most of the t
Simplest and Fastest way is just copy paste all in one shot only if you have image in already formatted folder as mentioned below.
Download any image from Meterial Icons here
Downloaded folder contains all levels of drawable folders (mdpi, hdpi, ect..)
Just copy all the folders and paste it to res folder, Here the folder is not replacing just the new image will going to add existing image.
In your Android Studio, Right click drawable -> New -> Image Asset -> Asset Type: Action Bar and Tab Icons. Image file: image_path, Resource Name: image name -> Next -> Finish
Done
This will add 4 different sizes of your image so that it will fit depending the device size
I usually do it in a very simple way: I use this tool to generate my images directly in the right folders names: you just have to open the tool and drag on it the bigger image (EG: the one you want to use for xhdpi folder or xxhdpi folder): the tool will create in the original image's folder all the other folders (mdpi,ldpi,hdpi etc) containing the image properly scaled. Once you have this folders you just have to paste them in res folder, DONE!
From Android studio -> Goto Configure->plugins. Search for "Batch Drawable importer" . Click Install. Then restart android studio.
It seem the way to do it is drag and dropping the resources to AS. For instance. We have a bunch of images, we grab all the xxhdpi images drop them in AS and then it will ask you which resolution are those images, so we choose from the pouup xxhdpi.. then, all the images in xhdpi drop again choose xhdpi from pop up, and that's the way to import assets to A.S. and so on with each resolution.