Created
June 14, 2022 09:22
-
-
Save mazzouzi/77c1036aec79ff3c73a4e3906e8a6361 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object DialogUtilSolution { | |
fun showError(context: Context?, title: String?, message: String?) { | |
if (context == null || (context as? Activity?)?.isFinishing == true) { | |
return | |
} | |
MaterialAlertDialogBuilder(context) | |
.setCancelable(true) | |
.setTitle(title) | |
.setMessage(message) | |
.setPositiveButton("OK", null) | |
.create() | |
.show() | |
} | |
// fun showSuccess(context, )... | |
// fun showLoader(context, )... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment