DialogSheet

Additional

Language
Java
Version
1.0.6 (Jul 25, 2018)
Created
Dec 2, 2017
Updated
Jul 28, 2018
Owner
Marcos Calvo García (marcoscgdev)
Contributors
Marcos Calvo García (marcoscgdev)
jobindcruz
Andrea Cioccarelli (AndreaCioccarelli)
3
Activity
Badge
Generate
Download
Source code
APK file

Promotion

DialogSheet

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


    

Creating the dialog with Kotlin

Here is a complete snippet of it usage:

val dialogSheet:DialogSheet = DialogSheet(this@MainActivity)
dialogSheet.setCancelable(false)
    .setTitle(R.string.app_name)
    .setMessage(R.string.lorem)
    .setCancelable(false)
    .setPositiveButton(android.R.string.ok) {
        // Your action
    }
    .setNegativeButton(android.R.string.cancel) {
        // Your action
    }
    .setBackgroundColor(Color.BLACK) // Your custom background color
    .setButtonsColorRes(R.color.colorPrimary)  // Default color is accent
    .show()

(TIP) Adding a custom view:

  • Via inflated view:
View 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
View inflatedView = dialogSheet.getInflatedView();
Button button = (Button) inflatedView.findViewById(R.id.customButton);
...

See the


sample project to clarify any queries you may have.