Kennyc1012 / BottomSheetMenu

BottomSheetMenu style dialogs for Android
Apache License 2.0
887 stars 99 forks source link

Allow to supply own menu or list of menu items #3

Closed amartinz closed 9 years ago

amartinz commented 9 years ago

Allows to customize the menu items before showing the sheet.

Example usage:

final BottomSheet.Builder builder = new BottomSheet.Builder(mActivity); builder.setTitle(weirdThing.getName()).setListener(appBottomSheetListener);

final Menu menu = createMenu(); if (!weirdThing.canOpen()) { menu.removeItem(R.id.sheet_open); }

builder.setMenu(menu).show();

Kennyc1012 commented 9 years ago

Thanks for the pull request. I like this idea and will accept it. I will however make a few additions to make the logic easier to follow regarding checking for list items, a menu, or a menu resource id.

amartinz commented 9 years ago

Cleanups are always nice, I'd say :)

I am using this library for one of my projects and i will send back what i am implementing, to suit my usage. I do not feel bad though if you reject requests :)

Thanks for creating this library!