All Projects → marcoscgdev → Dialogsheet

marcoscgdev / Dialogsheet

Licence: mit
An Android library to create fully material designed bottom dialogs similar to the Android Pay app.

Programming Languages

shell
77523 projects
kotlin
9241 projects

Projects that are alternatives of or similar to Dialogsheet

Materialdesign2
A beautiful app designed with Material Design 2 using Android X.
Stars: ✭ 170 (-27.97%)
Mutual labels:  material, design, materialdesign
Materialdesigndemo
A beautiful app designed with Material Design.
Stars: ✭ 1,391 (+489.41%)
Mutual labels:  material, design, materialdesign
Aestheticdialogs
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
Stars: ✭ 352 (+49.15%)
Mutual labels:  design, dialog, dialogs
React Native Material Dialog
Material design dialogs for React Native 💬
Stars: ✭ 135 (-42.8%)
Mutual labels:  material, dialog, dialogs
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (+15.25%)
Mutual labels:  material, design, dialog
Fabsmenu
A simple library to use a menu of FloatingActionButtons from Design Support Library that follow Material Design Guidelines
Stars: ✭ 324 (+37.29%)
Mutual labels:  material, design, materialdesign
Singledateandtimepicker
You can now select a date and a time with only one widget !
Stars: ✭ 921 (+290.25%)
Mutual labels:  material, design, dialog
Flat Dialog Android
📱Android Library to implement beautiful dialogs in android apps easily
Stars: ✭ 102 (-56.78%)
Mutual labels:  design, dialog
Materialize
Materialize, a CSS Framework based on Material Design
Stars: ✭ 38,630 (+16268.64%)
Mutual labels:  material, design
Material Discord
Material design theme for Discord
Stars: ✭ 127 (-46.19%)
Mutual labels:  material, design
Motion
A library used to create beautiful animations and transitions for iOS.
Stars: ✭ 1,726 (+631.36%)
Mutual labels:  material, design
Material Design For Bootstrap
Important! A new UI Kit version for Bootstrap 5 is available. Access the latest free version via the link below.
Stars: ✭ 9,463 (+3909.75%)
Mutual labels:  material, design
Vue Mdc
Material web components for Vue.js
Stars: ✭ 1,217 (+415.68%)
Mutual labels:  material, design
Arclayout
With Arc Layout explore new styles and approaches on material design
Stars: ✭ 1,662 (+604.24%)
Mutual labels:  material, design
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (-42.37%)
Mutual labels:  material, dialog
Materialdesigninxamltoolkit
Google's Material Design in XAML & WPF, for C# & VB.Net.
Stars: ✭ 11,603 (+4816.53%)
Mutual labels:  material, design
Simpledialogfragments
A collection of easy to use and extendable DialogFragment's for Android
Stars: ✭ 94 (-60.17%)
Mutual labels:  dialog, dialogs
Material Apex
A Material Design Theme for Oracle APEX
Stars: ✭ 161 (-31.78%)
Mutual labels:  material, design
React Mdc Web
Material Design Components for React
Stars: ✭ 175 (-25.85%)
Mutual labels:  material, design
Elegantdialog
A beautiful, customizable and interactive dialog for Android written in Kotlin/Java 😍
Stars: ✭ 189 (-19.92%)
Mutual labels:  design, dialogs

DialogSheet open-issues last commit

An Android library to create fully material designed bottom dialogs similar to the Android Pay app.


Releases:

Current release: 2.1.2.

  • This library is now based on Kotlin and AndroidX.

You can see all the library releases here.


Screenshots

        

Download the sample apk here.


Usage:

Adding the depencency

Add this to your root build.gradle file:

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

Now add the dependency to your app build.gradle file:

implementation 'com.github.marcoscgdev:DialogSheet:2.1.2'

Creating the dialog

Here is a complete snippet of it usage:

val dialogSheet = DialogSheet(this)
    .setTitle(R.string.app_name)
    .setMessage(R.string.lorem)
    .setColoredNavigationBar(true)
    .setTitleTextSize(20) // In SP
    .setCancelable(false)
    .setPositiveButton(android.R.string.ok) {
        // Your action
    }
    .setNegativeButton(android.R.string.cancel) {
        // Your action
    }
    .setNeutralButton("Neutral")
    .setRoundedCorners(false) // Default value is true
    .setBackgroundColor(Color.BLACK) // Your custom background color
    .setButtonsColorRes(R.color.colorAccent) // You can use dialogSheetAccent style attribute instead
    .setNeutralButtonColor(Color.WHITE)
    .show()

Creating the dialog using the new style

Simply use the new DialogSheet2 class:

val dialogSheet = DialogSheet2(this)
    ...
    ...
    .show()

Or add a new boolean-type argument to the dialog constructor:

val dialogSheet = DialogSheet2(this, true)
    ...
    ...
    .show()

Colorize buttons

You can do it programmatically

.setButtonsColorRes(R.color.colorPrimary)
.setPositiveButtonColorRes(R.color.colorPrimary)
.setNegativeButtonColorRes(R.color.colorNegative)
.setNeutralButtonColorRes(R.color.colorNeutral)

Or by adding this atribute to your main app theme

<item name="dialogSheetAccent">@color/colorAccent</item>

Customize corner radius

Simply override this dimen with your desired size

<dimen name="dialog_sheet_corner_radius">16dp</dimen>

Adding a custom view:

  • Via inflated view:
val view = View.inflate(context, R.layout.custom_dialog_view, null)
dialogSheet.setView(view)
  • Via layout resource:
dialogSheet.setView(R.layout.custom_dialog_view)

// Access dialog custom inflated view
val inflatedView = dialogSheet.getInflatedView()
val button = inflatedView.findViewById(R.id.customButton)
...

Custom resources:

Override it if you want :P

<dimen name="dialog_sheet_corner_radius">16dp</dimen>
<dimen name="dialog_sheet_icon_size">56dp</dimen>
<dimen name="dialog_sheet_v2_icon_size">60dp</dimen>
<dimen name="dialog_sheet_button_text_size">15sp</dimen>

See the sample project to clarify any queries you may have.


License

The MIT License (MIT)

Copyright (c) 2017 Marcos Calvo García

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].