Visit GitHub Repo


Android Arsenal

screenshot screenshot screenshot screenshot screenshot


  • Both list and grid style
  • Light and Dark theme as well as custom themeing options
  • XML style support
  • Tablet support
  • Share Intent Picker
  • API 19+

Using BottomSheetMenu

To get started using BottomSheetMenu, first you'll need to create a menu resource file with the defined actions.

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="">

        android:title="Share" />

        android:title="Upload" />

        android:title="Copy" />

        android:title="Print" />


Then create a BottomSheetMenuDialogFragment via the Builder interface

new BottomSheetMenuDialogFragment.Builder(getActivity())


BottomSheetMenu comes with both a Light and Dark theme to accommodate most scenarios. However, if you want to customize itr more, you can create your own style and supply it to the builder.
Customizable attributes are:

<!-- The text appearance of the title -->
<attr name="bottom_sheet_menu_title_text_appearance" format="reference" />

<!-- The number of columns to show when using the grid style -->
<attr name="bottom_sheet_menu_column_count" format="integer" />

<!-- The selector to be used for the items in the list/grid -->
<attr name="bottom_sheet_menu_selector" format="reference" />

<!-- The text appearance of the list items -->
<attr name="bottom_sheet_menu_list_text_appearance" format="reference" />

<!-- The text appearance of the grid items -->
<attr name="bottom_sheet_menu_grid_text_appearance" format="reference" />

Then create a style

<style name="MyBottomSheetMenuStyle" parent="@style/Theme.BottomSheetMenuDialog">
    <item name="bottom_sheet_menu_title_text_appearance">@style/TitleAppearance</item>
    <item name="bottom_sheet_menu_list_text_appearance">@style/ListAppearance</item>
    <item name="bottom_sheet_menu_grid_text_appearance">@style/GridAppearance</item>

<style name="TitleAppearance" parent="BottomSheetMenu.Title.TextAppearance">
    <item name="android:textColor">@android:color/holo_green_light</item>

<style name="ListAppearance" parent="BottomSheetMenu.ListItem.TextAppearance">
    <item name="android:textColor">@android:color/holo_red_light</item>
    <item name="android:textSize">18sp</item>

<style name="GridAppearance" parent="BottomSheetMenu.GridItem.TextAppearance">
    <item name="android:textColor">@android:color/holo_red_light</item>
    <item name="android:textSize">20sp</item>

Also note that each of these pre-defined styles also have a light theme. They are named similary with a .Light added to the end of the style name
@style/Theme.BottomSheetMenuDialog.Light @style/BottomSheetMenu.Title.TextAppearance.Light etc...

Then finally pass the style into the Builder object.

new BottomSheetMenuDialogFragment.Builder(getActivity(),


Based on the Material Design Guidelines, icons for a linear list styled BottomSheet should be 24dp, where as a grid styled BottomSheet should be 48dp.

Share Intents

BottomSheetMenu can also be used to create a Share Intent Picker that will be styled like the ones found in Android 5.x+. To create one, simply call one of the static createShareBottomSheet methods.

// Create the intent for sharing
Intent intent = new Intent(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_TEXT, "My text to share");
// Pass the intent into the createShareBottomSheet method to generate the BottomSheet.
DialogFragment share = BottomSheetMenuDialogFragment.createShareBottomSheet(getActivity(), intent, "My Title");
// Make sure that it doesn't return null! If the system can not handle the intent, null will be returned.
if (share != null), "MyTag");
// By default, it will be styled as a list. For a grid, pass the boolean value true after the title parameter

For further customization of the share intent including which apps will be either be shown or not shown, see the full signature of createBottomSheet


BottomSheetMenu uses the BottomSheetListener for callbacks

// Called when the BottomSheetMenuDialogFragment it first displayed
onSheetShown(BottomSheetMenuDialogFragment bottomSheet, Object object)

// Called when the BottomSheetMenuDialogFragment has been dismissed. Passed value of dismissEvent signifies how the BottomSheetMenuDialogFragment was dismiss. see [BottomSheetListener]( for possible values
onSheetDismissed(BottomSheetMenuDialogFragment bottomSheet,Object, object, @DismissEvent int dismissEvent)

// Called when an item is selected from the BottomSheetMenuDialogFragment
onSheetItemSelected(BottomSheetMenuDialogFragment bottomSheet, MenuItem item, Object object)

Upgrading to 3.X

  • BottomSheet has been renamed to BottomSheetMenuDialogFragment
  • Custom views and simple messages are no longer supported. Please use a BottomSheetDialogFragment and customize it from there
  • Many of the theme attributes have been removed or renamed. See the Styling section above for current values
  • CollaspingView has been removed.
  • Migration to AndroidX and Google Material Components
  • MinSdk is now 19, also targeting API 28

Upgrading From 1.x

When upgrading to 2.x from a 1.x release, some changes will have to be made.

  • All of the builder methods for settings colors have been removed. All customzing should be done through themes.
  • The style attributes have been change to text appearances rather than colors.
  • The Builder constructor no longer takes a menu object. You will need to call setSheet(...).
  • The onSheetDismissed callback now takes an int as an argument for simple message support.
  • The gradle dependency has changed and needs to be updated.

Including in your project

To include BottomSheet in your project, make the following changes to your build.gradle file

Add repository

allprojects {
    repositories {
        maven { url "" }

Add dependency

dependencies {
     implementation 'com.github.Kennyc1012:BottomSheetMenu:3.0.1'


Pull requests are welcomed and encouraged. If you experience any bugs, please file an issue


Copyright 2015 Kenny Campagna

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Become Pro in Android by watching videos