iamageo / BeautifulDialog

🌈 A Beautiful Dialog Library for Android 🗨️
Apache License 2.0
40 stars 6 forks source link

prevent dismiss #10

Closed IanLaFlair closed 1 year ago

IanLaFlair commented 1 year ago

How to prevent dismiss when at onPositive ? because i need to not close the dialog everytime click the onpositive

iamageo commented 1 year ago

Hello @IanLaFlair, thanks for you issue. 🔥

I added shouldIDismissOnClick in methods onPositive and onNegative with default value is true, just call it in your BeautifulDialog as in the code below:

.onPositive(text = "Confirm", shouldIDismissOnClick = false) { //your action here 
}
.onNegative(text = "Cancel", shouldIDismissOnClick = true) {  //your action here 
}

For this to work update to version 1.0.3