Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Dp as size and generate shadows for all DPI? #8

Open
molikto opened this issue May 22, 2017 · 4 comments
Open

Use Dp as size and generate shadows for all DPI? #8

molikto opened this issue May 22, 2017 · 4 comments

Comments

@molikto
Copy link

molikto commented May 22, 2017

No description provided.

@tomblenz
Copy link

Seconded. A workaround is to manually calculate the blur for your dpi but..

@yuraj11
Copy link
Collaborator

yuraj11 commented Feb 23, 2018

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?

@tomblenz
Copy link

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.

@tomblenz
Copy link

https://developer.android.com/training/multiscreen/screendensities.html#TaskProvideAltBmp is a great resource and should make the task nice and clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants