All Projects → Commit451 → Modalbottomsheetdialogfragment

Commit451 / Modalbottomsheetdialogfragment

Licence: apache-2.0
Modal bottom sheet dialog based on the Material Guidelines

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Modalbottomsheetdialogfragment

React Swipeable Bottom Sheet
A swipeable material's bottom sheet implementation, using react-swipeable-views
Stars: ✭ 106 (-74.82%)
Mutual labels:  material-design, bottomsheet
Tc Material Design
Série de artigos sobre o Material Design Android
Stars: ✭ 64 (-84.8%)
Mutual labels:  material-design, bottomsheet
Sheets
⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
Stars: ✭ 441 (+4.75%)
Mutual labels:  material-design, bottomsheet
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (-47.98%)
Mutual labels:  material-design, bottomsheet
Frames
Free, feature-rich, easily customizable Android dashboard for wallpapers apps
Stars: ✭ 396 (-5.94%)
Mutual labels:  material-design
Material Framework
[Unmaintained] An easy to use material design based framework.
Stars: ✭ 383 (-9.03%)
Mutual labels:  material-design
Material Dialogs
😍 A beautiful, fluid, and extensible dialogs API for Kotlin & Android.
Stars: ✭ 19,118 (+4441.09%)
Mutual labels:  material-design
Svelte Materialify
A Material UI Design Component library for Svelte heavily inspired by vuetify.
Stars: ✭ 351 (-16.63%)
Mutual labels:  material-design
Keen Ui
A lightweight Vue.js UI library with a simple API, inspired by Google's Material Design.
Stars: ✭ 4,039 (+859.38%)
Mutual labels:  material-design
Fancygifdialog Android
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.
Stars: ✭ 409 (-2.85%)
Mutual labels:  material-design
Md2
Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
Stars: ✭ 389 (-7.6%)
Mutual labels:  material-design
Spectro
🎶 Real-time audio spectrogram generator for the web
Stars: ✭ 383 (-9.03%)
Mutual labels:  material-design
Material Auto Rotating Carousel
Introduce users to your app with this Material-style carousel.
Stars: ✭ 400 (-4.99%)
Mutual labels:  material-design
Library Assistant
Modern Library Management Software using JavaFX
Stars: ✭ 380 (-9.74%)
Mutual labels:  material-design
Pangolin desktop
Pangolin Desktop UI shell, designed for dahliaOS, written in Flutter.
Stars: ✭ 408 (-3.09%)
Mutual labels:  material-design
Dashboard reborn
A very sexy Flutter UI template✨
Stars: ✭ 375 (-10.93%)
Mutual labels:  material-design
Blueprint
Free, feature-rich, easily customizable Android dashboard for icon packs
Stars: ✭ 389 (-7.6%)
Mutual labels:  material-design
Material Progressview
🔥A beautiful, gradual and simple used progress view for android.
Stars: ✭ 406 (-3.56%)
Mutual labels:  material-design
Android Mdc Theming
Sample code used for a series of Medium posts on Material Components for Android
Stars: ✭ 388 (-7.84%)
Mutual labels:  material-design
Pickimage
Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. 📸 🖼️
Stars: ✭ 386 (-8.31%)
Mutual labels:  material-design

ModalBottomSheetDialogFragment

Modal bottom sheet dialog based on the Material Guidelines

Build Status

Dependency

Add this in your root build.gradle file (not your module build.gradle file):

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

Then, add the library to your project build.gradle

dependencies {
    implementation 'com.github.Commit451:ModalBottomSheetDialogFragment:latest.version.here'
}

Usage

ModalBottomSheetDialogFragments are typically inflated via a menu item resource. The menu item resource defines the title, icon, and ID is of each Option. The menu item resource might looks something like this:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <item
        android:id="@+id/action_favorite"
        android:icon="@drawable/ic_favorite_black_24dp"
        android:title="Favorite" />

    <item
        android:id="@+id/action_share"
        android:icon="@drawable/ic_share_black_24dp"
        android:title="Share" />

    <item
        android:id="@+id/action_edit"
        android:icon="@drawable/ic_edit_black_24dp"
        android:title="Edit" />

</menu>

Use the builder to create and show the bottom sheet dialog:

ModalBottomSheetDialogFragment.Builder()
    .add(R.menu.options)
    .show(supportFragmentManager, "options")

Make sure that your activity or fragment implements ModalBottomSheetDialogFragment.Listener. For example:

override fun onModalOptionSelected(tag: String?, option: Option) {
    Snackbar.make(root, "Selected option ${option.title} from fragment with tag $tag", Snackbar.LENGTH_SHORT)
            .show()
}

You can also customize things to your liking:

ModalBottomSheetDialogFragment.Builder()
    .add(R.menu.option_lots)
    //custom option, without needing menu XML
    .add(OptionRequest(123, "Custom", R.drawable.ic_bluetooth_black_24dp))
    .layout(R.layout.item_custom)
    .header("Neat")
    .columns(3)
    .show(supportFragmentManager, "custom")

See the sample app for more.

License

Copyright 2020 Commit 451

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

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].