Please help me to implement menu bar item drop down with icon on right of item how to do
You can do something like this to get Expandable Drawer Item:
Drawer result = new DrawerBuilder()
.withActivity(this)
.withAccountHeader(header)
.addDrawerItems(
new ExpandableDrawerItem().withName("Item 1").withSubItems(
new SecondaryDrawerItem().withName("sub1"),
new SecondaryDrawerItem().withName("sub2")
),
new ExpandableDrawerItem().withName("item 2.").withSubItems(
new SecondaryDrawerItem().withName("one"),
new SecondaryDrawerItem().withName("two")
),
new ExpandableDrawerItem().withName("Item 3").withSubItems(
new SecondaryDrawerItem().withName("one"),
new SecondaryDrawerItem().withName("two")
)
)
.withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener() {
@Override
public boolean onItemClick(View view, int position, IDrawerItem drawerItem) {
return false;
}
})
.build();
@kkdroidgit thanks for answering.
@erishiraj please look at the sample app: https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.java#L120
Most helpful comment
You can do something like this to get Expandable Drawer Item: