You can create awesome menus with bottom sheet experience in a few lines

Related tags

Menu BottomSheetMenu
Overview

BottomSheetMenu

You can create awesome menus with bottom sheet experience in a few lines

Add the JitPack repository to your build file

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add dependency

dependencies {
    implementation 'com.github.mazenrashed:BottomSheetMenu:${LAST_VERSION}'
}

How to use

Create a menu

">
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/option1"
        android:icon="@drawable/ic_baseline_alarm_off_24"
        android:title="Turn alarm on" />
    <item
        android:id="@+id/option2"
        android:icon="@drawable/ic_baseline_alarm_on_24"
        android:title="Turn alarm off" />
menu>

Use BottomSheetMenu builder

val bottomSheet = MenuBottomSheet.Builder()
    .setMenuRes(R.menu.test_menu)          
    .closeAfterSelect(true)                
    .build()                               
  • You can add the menu items programmatically without menu file
val menuItems = arrayListOf(                                                  
    MenuBottomSheetItem("Turn alarm on", R.drawable.ic_baseline_alarm_on_24), 
    MenuBottomSheetItem("Turn alarm off", R.drawable.ic_baseline_alarm_off_24)
)                                                                             
            
val bottomSheet = MenuBottomSheet.Builder()
    .setMenuItems(menuItems)         
    .closeAfterSelect(true)                         
    .build()                        

Show menu

bottomSheet.show(this)

Listen to on item click

Toast.makeText(this, "Off", Toast.LENGTH_SHORT).show() else -> Toast.makeText(this, "Nothing", Toast.LENGTH_SHORT).show() } } ``` ">
bottomSheet.onSelectMenuItemListener = { position: Int, id: Int? ->           
    when (id) {                                                               
        R.id.option1 -> Toast.makeText(this, "On", Toast.LENGTH_SHORT).show() 
        R.id.option2 -> Toast.makeText(this, "Off", Toast.LENGTH_SHORT).show()
        else -> Toast.makeText(this, "Nothing", Toast.LENGTH_SHORT).show()    
    }                                                                         
}                                                                             ```

Contributing

We welcome contributions !

  • ⇄ Pull requests and ★ Stars are always welcome.
You might also like...
An app that helps you create & remove WSA icon in the start menu

WSA Helper An application that allows you to manager WSA's icons in start menus

Android-NewPopupMenu 3.9 0.0 Java  is an android library to create popup menu with GoogleMusic app-like style.
Android-NewPopupMenu 3.9 0.0 Java is an android library to create popup menu with GoogleMusic app-like style.

Android-NewPopupMenu Android-NewPopupMenu is an android library to create popup menu with GoogleMusic app-like style. Requirements Tested with APIv4 H

A menu which can ... BOOM! - Android
A menu which can ... BOOM! - Android

BoomMenu 2.0.0 Comes Finally Approximately 8 months ago, I got an inspiration to creating something that can boom and show menu, which I named it Boom

A multicard menu that can open and close with animation on android
A multicard menu that can open and close with animation on android

MultiCardMenu A multicard menu that can open and close with animation on android,require API level = 11 Demo ##Usage net.wujingchao.android.view.

An Android Library that allows users to pull down a menu and select different actions. It can be implemented inside ScrollView, GridView, ListView.
An Android Library that allows users to pull down a menu and select different actions. It can be implemented inside ScrollView, GridView, ListView.

AndroidPullMenu AndroidPullMenu is an Open Source Android library that allows developers to easily create applications with pull menu. The aim of this

Simple library which enable you to add a drawer(slide-out) navigation to your android application
Simple library which enable you to add a drawer(slide-out) navigation to your android application

SimpleSideDrawer is an android library to add a drawer navigation into your android application. This library has high affinity with other libraries l

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.
Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android - Bottom App Bar with Bottom Navigation in Jetpack compose
Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android - Bottom App Bar with Bottom Navigation in Jetpack compose

Bottom-App-Bar-with-Bottom-Navigation-in-Jetpack-compose-Android This is simple

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

SlidingMenu (Play Store Demo) SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus li

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

SlidingMenu (Play Store Demo) SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus li

The library that removes all boilerplate code allowing you to display lists with few lines of code.

VsRecyclerView The library that removes all boilerplate code allowing you to display lists with few lines of code. Gradle androidExtensions { expe

Android library that allows you to determine your location in a few of lines
Android library that allows you to determine your location in a few of lines

locsimple Android library that allows you to determine your location in some lines! Benefits: automatic processing of permissions processing of enabli

Events Calendar is a user-friendly library that helps you achieve a cool Calendar UI with events mapping. You can customise every pixel of the calendar as per your wish and still achieve in implementing all the functionalities of the native android calendar in addition with adding dots to the calendar which represents the presence of an event on the respective dates. It can be done easily, you are just a few steps away from implementing your own badass looking Calendar for your very own project! Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.
Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.

1. Add dependency dependencies { implementation 'com.hbb20:android-country-picker:X.Y.Z' } For latest version, 2. Decide your use-case

🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

AppUI Sample Application - display how you can create your own custom AppUI application within a few minutes
AppUI Sample Application - display how you can create your own custom AppUI application within a few minutes

AppUI Sample Application This is an open-source project to display how you can create your own custom AppUI application within a few minutes. I have a

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa

FabulousFilter Show some ❤️ and star the repo to support the project This library is the implementation of filter-concept posted on MaterialUp.com. It

Releases(1.1.0)
Owner
Mazen Rashed
Mazen Rashed
An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

SlidingMenu (Play Store Demo) SlidingMenu is an Open Source Android library that allows developers to easily create applications with sliding menus li

Jeremy Feinstein 11.1k Dec 21, 2022
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.

SlidingUpMenu A library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet. Gradle Dependency

Rasheed Sulayman 26 Jul 17, 2022
Spinner with bottom sheet dialog for Android

This is a small library for spinner view with displaying options in bottom sheet dialog. This view doesn't improve or extend the default android Spinner. The library doesn't support any other types of showing menu, only bottom sheet dialog.

Oleg Nestyuk 23 Oct 19, 2022
Bottom Sheet fragment with a sticky header and a content recycler view

Sticky Header Bottom Sheet A simple library to create a Bottom Sheet with a sticky header and a content recycler view. The bottom sheet expands on scr

Kshitij Kumar 12 Sep 21, 2022
Bottom Navigation widget component inspired by the Google Material Design Guidelines at https://www.google.com/design/spec/components/bottom-navigation.html

Material Bottom Navigation Library Lightweight Bottom Navigation library component inspired by the Google Material Design Guidelines at https://www.go

Alessandro Crugnola 1.4k Dec 18, 2022
Nested popup menus with smooth height animations

cascade cascade builds nested popup menus with smooth height animations. It is designed to be a drop-in replacement for PopupMenu so using it in your

Saket Narayan 1.6k Jan 6, 2023
You can easily add awesome animated context menu to your app.

ContextMenu You can easily add awesome animated context menu to your app. Check this project on dribbble Check this project on Behance Usage: For a wo

Yalantis 3.8k Dec 28, 2022
Android library that provides the floating action button to sheet transition from Google's Material Design.

MaterialSheetFab Library that implements the floating action button to sheet transition from Google's Material Design documentation. It can be used wi

Gordon Wong 1.6k Dec 13, 2022
Spotify like android material bottom navigation bar library.

SuperBottomBar About Spotify like android material bottom navigation bar library. GIF Design Credits All design and inspiration credits belongs to Spo

Ertugrul 73 Dec 10, 2022
Suhuf is an android library that is used to build bottom sheets in an elegant way.

Suhuf is an android library that is used to build bottom sheets in an elegant way.

Rahmat Rasyidi Hakim 10 Nov 15, 2021