MaterialDialogButtons

class MaterialDialogButtons(scope: MaterialDialogScope)

A class used to build a buttons layout for a MaterialDialog. This should be used in conjunction with the com.vanpra.composematerialdialogs.MaterialDialog.dialogButtons function

Constructors

Link copied to clipboard
fun MaterialDialogButtons(scope: MaterialDialogScope)

Functions

Link copied to clipboard
fun accessibilityButton(    icon: ImageVector,     colorFilter: ColorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground),     onClick: () -> Unit)

Adds a accessibility button to the bottom left of the dialog

Link copied to clipboard
fun button(    text: String? = null,     textStyle: TextStyle = MaterialTheme.typography.button,     @StringRes res: Int? = null,     colors: ButtonColors = ButtonDefaults.textButtonColors(),     onClick: () -> Unit = {})

Adds a button which is always enabled to the bottom of the dialog. This should only be used for neutral actions.

Link copied to clipboard
fun negativeButton(    text: String? = null,     textStyle: TextStyle = MaterialTheme.typography.button,     @StringRes res: Int? = null,     colors: ButtonColors = ButtonDefaults.textButtonColors(),     onClick: () -> Unit = {})

Adds a negative button to the dialog

Link copied to clipboard
fun positiveButton(    text: String? = null,     textStyle: TextStyle = MaterialTheme.typography.button,     @StringRes res: Int? = null,     colors: ButtonColors = ButtonDefaults.textButtonColors(),     disableDismiss: Boolean = false,     onClick: () -> Unit = {})

Adds a positive button to the dialog