Materialdrawer: How to add/remove items after creating the drawer?

Created on 26 Feb 2015  路  4Comments  路  Source: mikepenz/MaterialDrawer

Is it possible to add/remove items from the drawer after the initiation ?

help wanted

Most helpful comment

It's really easy:

Drawer.Result result = new Drawer().withActivity(this).build();
//now you can use the result and do some stuff with it
result.addItem(..);
result.removeItem(..);

All 4 comments

It's really easy:

Drawer.Result result = new Drawer().withActivity(this).build();
//now you can use the result and do some stuff with it
result.addItem(..);
result.removeItem(..);

wow that's easy ...... i actually wasted like 2 days with this other material drawer lib which won't allow to add/remove items dynamically ...that's why i asked without even trying the lib :)
You should create a wiki.....that will clarify the capabilities of this lib
Anyway thanks for the lib and for the reply

It is ;) and it should be :D

Drawer.Result result = new Drawer().withActivity(this).build();

is just the most simple configuration for the drawer. see the README.md for advanced usage :)

Does it have a method which removes all items with a particular tag ? I couldn't find any

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DasserBasyouni picture DasserBasyouni  路  4Comments

Erwinstein picture Erwinstein  路  3Comments

GutoMartins019 picture GutoMartins019  路  4Comments

wayne1203 picture wayne1203  路  3Comments

AlexMercier picture AlexMercier  路  3Comments