If you plan to implement dialog sheets in your app then this tutorial is for you. We want to examine with examples and snippets the best dialog sheet options for android development.

(a). DialogSheet

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

Here are example screenshots:


How to Install DialogSheet

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'

How to Use DialogSheet

Here’s a complete snippet of creating a dialog sheet in kotlin:

val dialogSheet = DialogSheet(this)
    .setTitleTextSize(20) // In SP
    .setPositiveButton(android.R.string.ok) {
        // Your action
    .setNegativeButton(android.R.string.cancel) {
        // Your action
    .setRoundedCorners(false) // Default value is true
    .setBackgroundColor(Color.BLACK) // Your custom background color
    .setButtonsColorRes(R.color.colorAccent) // You can use dialogSheetAccent style attribute instead


Here’s a complete example in Kotlin:


package com.marcoscg.dialogsheetsample

import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.widget.Button
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.marcoscg.dialogsheet.DialogSheet
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {

        button.setOnClickListener {

    private fun createAndShowDialog() {
        val useNewDialogStyle = newStyleCheckBox.isChecked

        val dialogSheet = DialogSheet(this@MainActivity, useNewDialogStyle) // you can also use DialogSheet2 if you want the new style
                //.setNewDialogStyle() // You can also set new style by this method, but put it on the first line
                //.setButtonsColorRes(R.color.colorAccent) // You can use dialogSheetAccent style attribute instead
                .setPositiveButton(android.R.string.ok) {
                    Toast.makeText(this@MainActivity, "Positive button clicked!", Toast.LENGTH_SHORT).show()

        if (customViewCheckBox.isChecked) {

            // Access dialog custom inflated view
            val inflatedView = dialogSheet.inflatedView
            val button = inflatedView?.findViewById<Button>(R.id.customButton)
            button?.setOnClickListener {
                Toast.makeText(this@MainActivity, "I'm a custom button", Toast.LENGTH_SHORT).show()

        if (!cornersCheckBox.isChecked)

        if (iconCheckBox.isChecked)


    override fun onCreateOptionsMenu(menu: Menu): Boolean {
        menuInflater.inflate(R.menu.main, menu)
        return true

    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        if (item.itemId == R.id.action_github) {
            startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/marcoscgdev/DialogSheet")))
            return true

        return super.onOptionsItemSelected(item)

You can find the source code here


Find complete reference and documentation here.