TwoButtons

fun TwoButtons(positiveAction: () -> Unit, positiveText: String, negativeAction: () -> Unit?, negativeText: String = stringResource(R.string.btn_back), showNegative: Boolean = true, disablePositive: Boolean = false)

A negative (outlined, on the left) and positive (filled, on the right) button. Useful in setup wizards.

Parameters

positiveAction

called when the positive button is pressed.

positiveText

the text for the positive button.

negativeAction

called when the negative button is pressed. Can be null, in which case the negative button isn't shown.

negativeText

the text for the negative button. Defaults to "Back".

showNegative

if false hides the negative button. Defaults to true.

disablePositive

if true disables the positive button. Defaults to false.