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

Ribbon is not added to API 26 adaptive-icon #8

Closed
eduardb opened this issue Feb 18, 2018 · 6 comments
Closed

Ribbon is not added to API 26 adaptive-icon #8

eduardb opened this issue Feb 18, 2018 · 6 comments

Comments

@eduardb
Copy link

eduardb commented Feb 18, 2018

Hi! I tried out the plugin and it works great on devices with Nougat or lower, but it doesn't work with adaptive icons on Oreo. I only have debug and release build types, and I added this block in app/build.gradle right below the android block:

easylauncher {
    iconNames "@mipmap/ic_launcher_foreground" 
    foregroundIconNames "@mipmap/ic_launcher_foreground" 
}

Is the plugin meant to support adaptive icons? Cheers!

@akaita
Copy link
Owner

akaita commented Feb 18, 2018

Yes, it is meant to work with adaptive icons :)

The example configuration assumes you have a defined your adaptive icon in a way similar to this:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@color/ic_launcher_background"/>
    <foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Could you share the definition of your adaptive icon?

@eduardb
Copy link
Author

eduardb commented Feb 18, 2018

Sure, it's very similar with yours, only that the background is another drawable, not a color:

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@drawable/ic_launcher_background" />
    <foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Could that be the problem?

@akaita
Copy link
Owner

akaita commented Feb 18, 2018

Yeah, you are just not pointing Easylauncher to the correct resource.

Please replace foregroundIconNames "@mipmap/ic_launcher_foreground" with:

foregroundIconNames "@drawable/ic_launcher_foreground" 

@eduardb
Copy link
Author

eduardb commented Feb 18, 2018

Ha, rookie mistake, but probably I wouldn't have spotted the difference for a long time, thanks for pointing out to me. However, even with the correct resource, it still doesn't seem to work... I forgot to mention though, @drawable/ic_launcher_foreground is a vector drawable. Maybe those aren't supported?

@akaita
Copy link
Owner

akaita commented Feb 18, 2018

Ha, rookie mistake

xD

@drawable/ic_launcher_foreground is a vector drawable

True, I didn't add support for those...
I created #9 so it doesn't get forgotten.

@akaita akaita closed this as completed Feb 18, 2018
@eduardb
Copy link
Author

eduardb commented Feb 19, 2018

Cool, thanks for your time! I hope to see vector drawable support soon :D

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

No branches or pull requests

2 participants