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

custom badge doesn't work #8

Closed
tlzxsun opened this issue Apr 20, 2016 · 2 comments
Closed

custom badge doesn't work #8

tlzxsun opened this issue Apr 20, 2016 · 2 comments

Comments

@tlzxsun
Copy link

tlzxsun commented Apr 20, 2016

The CustomBadgeProvider works in your demo application, but doesn't work in my app. It's really weird. What' more weird is you libary cause color #ffffff turns into color_primary in my app, that's really annonying.

I just write a simple CustomBadgeProvider.java.

public class CustomBadgeProvider extends BadgeProvider{
    public CustomBadgeProvider(BottomNavigation navigation) {
        super(navigation);
    }


    Drawable getBadge(@IdRes int itemId) {
        return new BadgeDrawable(Color.BLUE, 192);
    }
}

but the badge doesn't change as i write in getBadge method.

@sephiroth74
Copy link
Owner

Have you also defined your CustomBadgeProvider in the layout xml?

@tlzxsun
Copy link
Author

tlzxsun commented Apr 21, 2016

Yes, I have defined in layout xml and it works in some devices. But it doesn't work in nexus 5 6.0.1. I think maybe it's the device problem or some thing.

@tlzxsun tlzxsun closed this as completed Apr 21, 2016
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