Sliding menu from bottom, like in Dropbox

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

Answers (1)

Giorgio Antonioli
Giorgio Antonioli

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

Related Questions