You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Josef Brandl (JIRA)" <ji...@apache.org> on 2017/12/19 12:29:00 UTC

[jira] [Comment Edited] (CB-13685) Android Adaptive Icons

    [ https://issues.apache.org/jira/browse/CB-13685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16296712#comment-16296712 ] 

Josef Brandl edited comment on CB-13685 at 12/19/17 12:28 PM:
--------------------------------------------------------------

[~Sujan12] There's an npm package for automatically creating app icons from an image file. Maybe you mean that. It doesn't support adaptive icons, though.

[~bowserj] I'll propably do just that, because I need an interim solution. I just wanted to post this as an issue, because I feel that adaptive icons are the way forward for Android. It seems that Google put quite some thought into this new app icon system.

Here's an idea:
A definition in config.xml like this:
{{<icon src-foreground="res/android/icon-foreground.png" src-background="res/android/icon-background.png" platform="android" width="108" height="108" density="mdpi" />}}

And in addition to that a plugin that generates the fallback image resources for older devices.


was (Author: majorbreakfast):
[~Sujan12] There's an npm package for automatically creating app icons from an image file. Maybe you mean that. It doesn't support adaptive icons, though.

[~bowserj] I'll propably do just that, because I need an interim solution. I just wanted to post this as an issue, because I feel that adaptive icons are the way forward for Android. It seems that Google put quite some thought into this new app icon system.

Here's an idea:
A definition in config.xml like this:
{{<icon src-foreground="res/android/icon-foreground.png" src-background="res/android/icon-foreground.png" platform="android" width="108" height="108" density="mdpi" />}}

And in addition to that a plugin that generates the fallback image resources for older devices.

> Android Adaptive Icons
> ----------------------
>
>                 Key: CB-13685
>                 URL: https://issues.apache.org/jira/browse/CB-13685
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-android
>         Environment: All
>            Reporter: Josef Brandl
>            Assignee: Joe Bowser
>            Priority: Minor
>
> Starting with Android 8 Oreo (API level 26) Android allows developers to create app icons using a background and a foreground image file. This feature is called "adaptive icons". One major change that goes with this feature is that icons get now clipped into a shape by the system. This leads to a very uniform and clean design like on iOS where all icons are a rounded rectangle. The other advantage is that visual effects can be applied to the icon by the system due to the separation between foreground an background.
> Android Studio greatly assists the developer at the creation of the app icon resources because it creates backwards compatible icons for older devices that don't support the adaptive icons feature.
> https://developer.android.com/studio/write/image-asset-studio.html
> The following resources are created.
> {code}
> res
> ├── drawable
> │   ├── ic_launcher_background.xml
> │   └── ic_launcher_foreground.xml
> ├── mipmap-anydpi-v26
> │   ├── ic_launcher.xml
> │   └── ic_launcher_round.xml
> ├── mipmap-hdpi
> │   ├── ic_launcher.png
> │   └── ic_launcher_round.png
> ├── mipmap-mdpi
> │   ├── ic_launcher.png
> │   └── ic_launcher_round.png
> ├── mipmap-xhdpi
> │   ├── ic_launcher.png
> │   └── ic_launcher_round.png
> ├── mipmap-xxhdpi
> │   ├── ic_launcher.png
> │   └── ic_launcher_round.png
> └── mipmap-xxxhdpi
>      ├── ic_launcher.png
>      └── ic_launcher_round.png
> {code}
> It is currently not clear how these files can be used inside a cordova project.
> - res/mipmap-anydpi-v26/ic_launcher.xml points to other image resources (foreground, background)
> - The foreground and background can be vector graphics (-> xml files in res/drawable)
> - The documentation needs to be updated
> (I've never reported an issue using JIRA before - I'm only used to github. So, please guide me if I'm doing something incorrect)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org