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
Allow setting a padding on android icons #417
Conversation
Played a little bit around and this seems not really possible with the current options. The closest I came was to avoid applying the scale to the legacy items (which require a padding by default). |
Images of scaling 30 and 80: The two on the right are the legacy ones which are generated from "icon-only" or "android/icon". These cannot be scaled atm because them would require to have foreground and background separated which is currently not implemented that way because all assets are looped and therefore the "icon-only" overrides the previous comb of fore- and background. |
I think the only one that really needs any padding possibly is the round and legacy launcher icons. Let me know when you want me to take another look. We can figure out what option we want to call this later but I agree with the functionality |
Yes. From what I saw in Android Studio and Google is that by default it creates a padding around the legacy icons (when you right-click and generate an image asset resource). So, I wouldn't make this an option but apply it by default (as before). Having a resize method to scale the foreground would make sense in case of Android. From two of my projects, I had to scale to 65% of what looked perfectly on iOS. IDK why Android does that zooming, and it is just relevant for API above 29. |
Another test with the latest main Branch merged into this. Source assets: assets.zip Command: Result:
I think |
This might be addressed by #424, if folks think that's a good approach to the Android scaling issue. |
Just gave it a test and it appears to be working for me Any idea whether this padding needs to be adjusted to account for the inset for adaptive icons done in #424? Also I think |
From the two links below, I'm wondering if the https://developer.android.com/develop/ui/views/launch/icon_design_adaptive |
When will this change will be released? |
@mlynch, @muuvmuuv I have tested this and it works fine. |
@muuvmuuv, @mlynch version 2.0.4 (latest) does not work for me while the change on your branch does work. I can see that this branch has been merged but only one file seems to be merged https://github.com/ionic-team/capacitor-assets/pull/424/files. Also when we navigate to your branch there is an additional usage description:
...but when we navigate to the latest verion branch there is so such usage description which seems to confirm that the branch has only been partially merged. |
@muuvmuuv thanks, I actually have confused the two branches :-). Thanks everyone. |
Adds an option
--android-resize
, that allows scaling the source image for modern icons (API>24).Closes #118