showSnackBar

public final Unit showSnackBar(Activity activity, View view, Integer textId, Integer colorId, Integer delayMs, Float marginDp)

A utility method that shows a snackbar with a message.

Parameters

activity

The activity to show the snackbar in

view

The view to which the snackbar should be attached

textId

The message of the snackbar

colorId

The color of the snackbar

delayMs

The delay in milliseconds after which the snackbar should be dismissed.

marginDp

The bottom margin in dp to be applied to the snackbar. Setting this value means that the no new snackbar will be shown until the current snackbar is dismissed.