shadow4android
shadow4android copied to clipboard
Use Dp as size and generate shadows for all DPI?
Seconded. A workaround is to manually calculate the blur for your dpi but..
Thanks for the suggestion. I am not sure about this one to be honest. Could you please provide steps how do you do It manually? Do I need change blur too or only change the dimensions of the rectangle?
The main dpi buckets in use today are mdpi (1x), hdpi (1.5x), xhdpi (2x), xxhdpi (3x), xxxhdpi (4x). This tool generates a single image, so I assume that the image is mdpi. To generate the higher resolutions you only need to make everything larger. So if the user has chosen a box size of 200x200 with 20 blur your hdpi version will have 1.5x the size of everything (300x300 with 30 blur), xhdpi will have 2x (400x400 with 40 blur), etc. I'd imagine it should be pretty simple.
Then just provide a .zip as the download with each version in their corresponding drawable-mdpi\%filename%
, drawable-hdpi\%filename%
etc folders.
https://developer.android.com/training/multiscreen/screendensities.html#TaskProvideAltBmp is a great resource and should make the task nice and clear.