From 8fcf8bc117cc73dcf18efa9cb82b6d3348d2ce43 Mon Sep 17 00:00:00 2001 From: Javier Santos Date: Sat, 16 May 2020 15:58:56 +0200 Subject: [PATCH] Update README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 3be46e8..93b3949 100644 --- a/README.md +++ b/README.md @@ -308,6 +308,18 @@ If `autoDismiss()` is turned `false`, then you must manually dismiss the dialog A divider before the buttons can be added using the `.withDivider(true)` method (`false` by default). +#### Get the buttons of the dialog +If you need to access the buttons of your dialog, you can achieve it like this: +```kotlin +val dialog = MaterialStyledDialog.Builder(this) + .setTitle("Awesome!") + .setDescription("This is a sample description.") + .show() + +dialog.positiveButton().text = "Positive" +dialog.negativeButton().text = "Negative" +``` + ### Dismissing when touching outside The `setCancelable()` method lets you disable dismissing the bottom dialog when you tap outside the dialog window. `true` by default.