Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersantos committed May 16, 2020
1 parent 7414b6d commit 8fcf8bc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 8fcf8bc

Please sign in to comment.