Reputation: 141
Does anybody know, what menu does Dropbox use in Android? I can't understand, is it a SlidingDrawer, NavigationDrawer or somesing else. Something like this, would be very useful for me.
Upvotes: 0
Views: 281
Reputation: 16224
It's a material BottomSheet. There aren't official android sdk to integrate it but Flipboard provides a library with some BottomSheet utils.
You can find it there: https://github.com/Flipboard/bottomsheet
And use:
MenuSheetView menuSheetView = new MenuSheetView(MenuActivity.this, MenuSheetView.MenuType.LIST, "Create...", new MenuSheetView.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if (bottomSheetLayout.isSheetShowing()) {
bottomSheetLayout.dismissSheet();
}
// do something
return true;
}
});
menuSheetView.inflateMenu(R.menu.create);
bottomSheetLayout.showWithSheetView(menuSheetView);
Upvotes: 3