1

I use the MaterialDrawer library by Mike Penz. (version 6.0.0)

My drawer contains an ExpandableBadgeDrawerItem (with ID=1) with a SecondaryDrawerItem (with ID=2).

Both have styles set up for them, and using .setBadge directly in the drawer builder (result) works perfectly for both of them.

However, when calling

result.updateBadge(1, new StringHolder("1"));
result.updateBadge(2, new StringHolder("1"));

only the ExpandableBadgeDrawerItem receives a badge.

My Question: Is this a bug or am I just missing something?

Makarele
  • 59
  • 9

1 Answers1

0

Just use getIdentifier() for yor items..

private Drawer result = null;
private PrimaryDrawerItem item1;
private SecondaryDrawerItem item2;

in onCreate..

item1 = new PrimaryDrawerItem().withName...
item2 = new SecondaryDrawerItem().withName...
result = new DrawerBuilder()...item1,item2

result.updateBadge(item1.getIdentifier(), new StringHolder(1));
result.updateBadge(item2.getIdentifier(), new StringHolder(2));
DeltaFoX
  • 31
  • 4