Skip to content

Commit 8fcf8bc

Browse files
authored
Update README.md
1 parent 7414b6d commit 8fcf8bc

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,18 @@ If `autoDismiss()` is turned `false`, then you must manually dismiss the dialog
308308

309309
A divider before the buttons can be added using the `.withDivider(true)` method (`false` by default).
310310

311+
#### Get the buttons of the dialog
312+
If you need to access the buttons of your dialog, you can achieve it like this:
313+
```kotlin
314+
val dialog = MaterialStyledDialog.Builder(this)
315+
.setTitle("Awesome!")
316+
.setDescription("This is a sample description.")
317+
.show()
318+
319+
dialog.positiveButton().text = "Positive"
320+
dialog.negativeButton().text = "Negative"
321+
```
322+
311323
### Dismissing when touching outside
312324
The `setCancelable()` method lets you disable dismissing the bottom dialog when you tap outside the dialog window. `true` by default.
313325

0 commit comments

Comments
 (0)