Last active
April 26, 2021 04:15
-
-
Save amsterdatech/c86f6072ae19dbc41bae46068d0b76cd 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
val showDialogButton = findViewById<Button>(R.id.show_dialog_button) | |
showDialogButton?.let { | |
it.setOnClickListener { | |
dialog { | |
title = resources.getString(R.string.custom_dialog_title) | |
contentText = resources.getString(R.string.custom_dialog_body) | |
negativeText = resources.getString(R.string.custom_dialog_negative_text) | |
positiveText = resources.getString(R.string.custom_dialog_positive_text) | |
positiveAction = { toast("Positive Action!!!") } | |
negativeAction = { toast("Negative Action!!!") } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment