I just want to know that , is it a good practice to use single large icon and re-size them programatically for all different resolution rather having 4 to 5 icons in different folder like (hdpi , mdpi , ldpi , xhdpi , xxhdpi).
So , can we use DisplayMetrics class or to have different layout folder for all resolution to change the icon width-height programatically.
Please suggest me some solution.
It is not a good idea to do this programatically when the functionality exists to display the correct icon automatically. The folders... hdpi , mdpi , ldpi , xhdpi , xxhdpi
If you look at the example provided in Eclipse, it shows the proper dimensions for your icon. You should match your icon to each of those sizes. Start with the largest. Then use Photoshop to resize the images accordingly for the smaller sizes.
The upshot is that the system will automatically choose the correct image for whatever screen is being used, and it will always look perfect. And no system resources are wasted on resizing the image.