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

wayne1203 picture wayne1203  ·  3Comments

singhalavi picture singhalavi  ·  4Comments

kakai248 picture kakai248  ·  4Comments

sonh picture sonh  ·  3Comments

jd-alexander picture jd-alexander  ·  4Comments