Closed hawkrives closed 5 years ago
This would be nice to have. I know there exists some RN packages that let us do dynamic icons for iOS, but this would be nice to have on Android.
To me, it makes sense to store an SVG in this repository and then to render to .png or .jpg at whatever resolution and compression level we desire, presumably in an npm script that can be called in CI when we are finally building the thing.
This would also allow for something cool like a custom beta icon or a custom nightly icon, too.
@rye If you can get an svg of the icon, I'd love to not store the ~36 copies of the icon that we currently do.
If we want to generate them for beta, we'd need to add some more logic to differentiate between "here's an alpha/beta/rc" and "here's a release" (probably just by looking at the package.json version) so that we don't add a badge to the release bundles.
I've made a vector of the background of the main icon, but I don't particularly want to recreate the foreground.
@rye Could you ask around at SGA to see if anyone has the original assets?
Re-triaging into v2.8 since we redesigned the main icon and it needs to get borders from the launcher. Android currently is missing the foreground
and background
things, which are required. Since I committed an SVG, I'm going to look at scripting some way to extract just the fg and the bg—these are, after all, in separate groups, so I should be able to slice just the fg and the bg and export them as their respective things.
Here's a key thing from the documentation:
You can control the look of your adaptive launcher icon by defining 2 layers, consisting of a background and a foreground. You must provide icon layers as drawables without masks or background shadows around the outline of the icon.
(emphasis mine)
I think because they're stored in the tree of mipmap
things, and those are somehow not considered "drawables," we can't use adaptive icons yet. (Presumably they want to do transforms at render-time, and doing so with raster graphics is gross.)
So the checklist I can think of is:
mipmap
-y things with drawable
things.26
, if it is less than that currently.@rye There's a thing in Android Studio that can convert an SVG into an Android "vector drawable", which can then be fed into the Android Studio icon editor - might help.
I have now set up two new exports in the Sketch project for the foreground ("Old Main" visual) and the background. (yellow to black gradient background)
I will run these through the converter, since it doesn't appear we can directly reference an SVG.
Work in progress over at #4059.
Docs: https://developer.android.com/preview/features/adaptive-icons.html.
See the Creating Adaptive Icons section for more information on making them.
My take: this looks even simpler than the current icon.
We provide the glyph and a background, then let the system render them into one bitmap.