setAction

@CanIgnoreReturnValue
open fun setAction(@StringRes resId: Int, listener: View.OnClickListener): Snackbar

Set the action to be displayed in this BaseTransientBottomBar.

Parameters

resId

String resource to display for the action

listener

callback to be invoked when the action is clicked


@CanIgnoreReturnValue
open fun setAction(@Nullable text: CharSequence, @Nullable listener: View.OnClickListener): Snackbar

Set the action to be displayed in this BaseTransientBottomBar.

Parameters

text

Text to display for the action

listener

callback to be invoked when the action is clicked