showDialog

fun Context.showDialog(title: String, message: String, positiveAction: Pair<String, () -> Unit?>, negativeAction: Pair<String, () -> Unit?>? = null)

Extension function of Context to display Material Dialog

Parameters

title

String as the title of the dialog

message

String as the message of the dialog

positiveAction

set of Pair to define the positive title button and its' action

negativeAction

set of Pair to define the negative title button and its' action, nullable by default