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

Support new 'adaptive' icons in Android 8+ #60

Closed
fiznool opened this issue Aug 22, 2018 · 12 comments
Closed

Support new 'adaptive' icons in Android 8+ #60

fiznool opened this issue Aug 22, 2018 · 12 comments
Assignees
Labels

Comments

@fiznool
Copy link

fiznool commented Aug 22, 2018

Android 8+ has a set of new guidelines for app icons: https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

The general idea is that you provide an icon and a background colour. The icon has transparency, and is overlaid onto the background colour. The whole thing is then masked by the device, to produce a circle, square, rounded square, etc. To facilitate a circular mask, you can also specify a different icon to use for circular masks.

I'm adding this issue more as a 'nice to have', as it would require a few changes for sure! Some way of asking:

  • whether this behaviour is desired at all (using the 'legacy' launcher icons will still work)
  • if so, whether a different icon file should be used, and what background colour to use

and then the associated changes to the XML files as described in the above link.

Unfortunately I don't have any spare time to dedicate to a PR right now, but thought I'd bring it up in case it was on your roadmap.

Thanks for a great library - it's been a big timesaver for me 😄

@dwmkerr
Copy link
Owner

dwmkerr commented Aug 28, 2018

I think it would be great to support this, thanks for sharing! I'll take a look at it when I get a little time, probably a couple of weeks from now :)

@valposv
Copy link

valposv commented Oct 15, 2018

@dwmkerr what's the status of this issue? Is it expected to be done soon?

@dwmkerr
Copy link
Owner

dwmkerr commented Oct 17, 2018

Hi @the-rs it'll be a couple of weeks still before I can look at this, but will be using it for a project I'm working on then so will definitely be getting onto it1

@hrhosni
Copy link

hrhosni commented Nov 6, 2018

Hey @dwmkerr . Just looking for an update on this issue?
Thanks!

@dwmkerr
Copy link
Owner

dwmkerr commented Nov 27, 2018

I got the Windows build and tests working which slowed me down, I can actually and finally look at this now.

One thing I'd love is a suggestion on how we manage the multiple images - should it be something like a convention to have:

icon.png
icon.adaptive.layer1.png
icon.adaptive.layer2.png
icon.adaptive.mask.png

Or command line flags? At the moment, here are my design goals:

  1. For people not using the feature, it should not interfere with them
  2. For people who do want to use the feature, they should be able to use it with very little effort and intuitive documentation (I'm even thinking of something like app-icon init to create template icons).
  3. People should be able to keep the icons outside of the root of their project if they want, to avoid cluttering the base

Does anyone else have any suggestions?

@hrhosni
Copy link

hrhosni commented Nov 27, 2018

Hi @dwmkerr !
Well if we can mimic whatever the tool that's built in Android Studio does, it'd be great. I'm not sure where it places the adaptive icons and what it names them but everything works great when I use it.

As for the design goals, they seem pretty comprehensive to me.

Again, thanks a lot for your efforts. They're much appreciated.

@valposv
Copy link

valposv commented Jan 11, 2019

Hello @dwmkerr !
I think command line flags would be more suitable rather than explicit creation. Template icons is also pretty useful feature to have. Can we expect adaptive icons support soon?
Regards. Thanks

@dwmkerr
Copy link
Owner

dwmkerr commented Jan 20, 2019

Yep will be pushing it in shortly!

@dwmkerr dwmkerr self-assigned this Jan 20, 2019
@valposv
Copy link

valposv commented Feb 4, 2019

@dwmkerr hello, what's the status?

@pie6k
Copy link

pie6k commented Mar 12, 2019

@dwmkerr any update on this?

@dwmkerr
Copy link
Owner

dwmkerr commented Apr 18, 2019

OK for those watching the issue, here's the progress. I'll keep the updates on this comment:

Current Issues

@dwmkerr dwmkerr pinned this issue Apr 25, 2019
@dwmkerr
Copy link
Owner

dwmkerr commented Apr 25, 2019

OK! Finally 😄

This took a lot longer than expected to get right, and I am still not 100% sure it is perfect, but adaptive icon support is available in v0.11.0

In short, first create some template icons:

$ app-icon init --adaptive-icons
icon.png created
icon.background.png created
icon.foreground.png created

This will create the icons you can use as your main template icons. Then spit out each size with:

$ app-icon generate --adaptive-icons

At the moment, all adaptive icon features are 'opt-in' with the --adaptive-icons flag, until I've seen that it seems to be working well for a large enough group of people.

@dwmkerr dwmkerr closed this as completed Apr 25, 2019
@dwmkerr dwmkerr unpinned this issue Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants