CustomDialog

CustomDialog is not a view, it is a wrapper around AlertDialog with the purpose of being a single point for customisations.

Usage

To use CustomDialog, use createBuilder() and show() methods defined in its interface:

fun createBuilder(): AlertDialog.Builder
fun show(dialogMessage: DialogMessage)
fun show(message: String)
fun show(
title: String,
message: String,
positiveButtonText: String,
negativeButtonText: String? = null,
action: (() -> Unit)?
)

You can inject it with Koin:

private val customDialog: CustomDialog by inject { parametersOf(context)) }