MaterialDrawer
MaterialDrawer copied to clipboard
Add badge color
How can be added the badge background color as appears in the screenshot?
Thanks and awesome update!

Hi Javier,
You can find it in the sample app. But I'll explain it for you:
Define two colors; the backgroundColor you want and a pressedColor you'll see when you press the Item.
Then create a BadgeStyle:
BadgeStyle badgeStyle = new BadgeStyle(backgroundColor, pressedColor).withTextColor(Color.WHITE);
And then apply that badgeStyle to your Items. For example:
new PrimaryDrawerItem().withBadgeStyle(badgeStyle).withBadge("10")
@echthard thanks for answering.
Nice! Thanks @echthard.