Resizing your images via code can cause blurriness and sometimes even performance issues. If you are doing 2D games, it is great if you can have sharp, crisp non-sized images. If you are trying to get depth effects, or show big and small versions of the same sprite, then you have to do sizing, but if you do, try to do it in sizes that will give you and easy mathematical ratio that will size cleanly (make it 1/2 size, or 3/4 size, not 0.6 of the size, for example).
Find what size you want the sprite to be, and then use the same proportions that those other answers give you. If 160 pixels high for xhdpi works, then use these ratios:
- xhdpi: 160x160
- hdpi: 120x120
- mdpi: 80x80
- ldpi: 60x60
similarly if 160x160 is the size you want for hdpi, then use this kind of scale:
- xhdpi: 240x240
- hdpi: 160x160
- mdpi: 120x120
- ldpi: 90x90
Don't size them on the fly, and store the appropriate file in the right drawable folders. You will get a much better look.