-
-
Save PatilShreyas/f150d4169971ff0da3a4e3e8c373d97b 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
fun showDialog( | |
title: String = "", | |
subTitle: String = "", | |
message: String = "", | |
isCancellable: Boolean = true, | |
positiveButton: Button? = null, | |
negativeButton: Button? = null, | |
) { | |
// Your code | |
} | |
fun main() { | |
// Show simple info dialog | |
showDialog( | |
title = "Info", | |
message = "Here's Info" | |
) | |
// Show dialog with button | |
showDialog( | |
title = "Exit", | |
message = "Want to exit application?", | |
positiveButton = Button("Yes"), | |
negativeButton = Button("No"), | |
isCancellable = false | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment