Android Studio: Drawable Folder: How to put Images for Multiple dpi?
There are two ways of doing it.
1.Right click on drawable New->Image Asset-> select your highest resolution image rest will be created automatically. once you finish you can see different resolution inside drawable folder
- The way you want. on the project Explorer window you see a dropdown as Android. Click it change to project.
Now yourprojectname->app->src->main->res->
Aila You can see your drawable folders with hdpi mdpi etc.
The easiest way I have found to have the proper "directory" structure appear under the drawable folder for my icons is this:
- Right click "Drawable"
- Click on "New", then "Image Asset"
- Change "Asset Type" to "Action Bar and Tab Icons"
- For "Foreground" choose "ClipArt"
- For "Clipart" click and "Choose" button and pick any icon
- For "Resource Name" type in you icon file name
Now the pseudo-directories have been created for you under the Drawable folder in the Android view. Open up the true directories on your file system "main/res/drawable-xxhdpi", "main/res/drawable-xhdpi" and replace the icons in each folder with your own of the proper density.
The standard procedures are:
- Choose Project > app > scr > main
- Right click "res", choose "New" and choose "Android resource directory"
- In the opened dialog, at Resource Type choose "drawable"
- In the list Available qualifier choose Density, then click the right arrow at the middle.
- Choose the Density that you like then press OK