Skip to content

Commit

Permalink
- Deleted setCancelableOnTouchOutside()
Browse files Browse the repository at this point in the history
- Added setCancelable()
  • Loading branch information
Ido-Barnea committed Apr 23, 2022
1 parent 83de163 commit 01ed14e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dialoger/src/main/java/com/barnea/dialoger/Dialoger.kt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Dialoger(
TYPE_LOADING -> {
getDialogProgressBar().visibility = View.VISIBLE
getDialogButton().visibility = View.GONE
setCanceledOnTouchOutside(false)
setCancelable(false)
}
}
}
Expand Down Expand Up @@ -234,11 +234,11 @@ class Dialoger(
}

/**
* @param isCanceledOnTouchOutside whether the dialog will be dismissed on touch outside of it or not
* @param isCancelable whether the dialog will be dismissed on back press or by any other means
* @return Dialoger object
*/
fun setCanceledOnTouchOutside(isCanceledOnTouchOutside: Boolean): Dialoger {
dialog.setCanceledOnTouchOutside(isCanceledOnTouchOutside)
fun setCancelable(isCancelable: Boolean): Dialoger {
dialog.setCancelable(isCancelable)
return this
}

Expand Down

0 comments on commit 01ed14e

Please sign in to comment.