make

fun make(view: View, text: CharSequence, duration: Int): DeweySnackbar

Make a Snackbar to display a message

Snackbar will try and find a parent view to hold Snackbar's view from the value given to view. Snackbar will walk up the view tree trying to find a suitable parent, which is defined as a CoordinatorLayout or the window decor's content view, whichever comes first.

Having a CoordinatorLayout in your view hierarchy allows Snackbar to enable certain features, such as swipe-to-dismiss and automatically moving of widgets.

Parameters

view

The view to find a parent from. This view is also used to find the anchor view when calling DeweySnackbar.setAnchorView.

text

The text to show. Can be formatted text.

duration

How long to display the message. Can be LENGTH_SHORT, LENGTH_LONG, LENGTH_INDEFINITE, or a custom duration in milliseconds.


fun make(context: Context, view: View, text: CharSequence, duration: Int): DeweySnackbar

Make a Snackbar to display a message

Snackbar will try and find a parent view to hold Snackbar's view from the value given to view. Snackbar will walk up the view tree trying to find a suitable parent, which is defined as a CoordinatorLayout or the window decor's content view, whichever comes first.

Having a CoordinatorLayout in your view hierarchy allows Snackbar to enable certain features, such as swipe-to-dismiss and automatically moving of widgets.

Parameters

context

The context to use to create the Snackbar view.

view

The view to find a parent from. This view is also used to find the anchor view when calling DeweySnackbar.setAnchorView.

text

The text to show. Can be formatted text.

duration

How long to display the message. Can be LENGTH_SHORT, LENGTH_LONG, LENGTH_INDEFINITE, or a custom duration in milliseconds.


fun make(context: Context, view: View, @StringRes resId: Int, duration: Int): DeweySnackbar

Make a Snackbar to display a message.

Snackbar will try and find a parent view to hold Snackbar's view from the value given to view. Snackbar will walk up the view tree trying to find a suitable parent, which is defined as a CoordinatorLayout or the window decor's content view, whichever comes first.

Having a CoordinatorLayout in your view hierarchy allows Snackbar to enable certain features, such as swipe-to-dismiss and automatically moving of widgets.

Parameters

context

The context to use to create the Snackbar view.

view

The view to find a parent from.

resId

The resource id of the string resource to use. Can be formatted text.

duration

How long to display the message. Can be LENGTH_SHORT, LENGTH_LONG, LENGTH_INDEFINITE, or a custom duration in milliseconds.


fun make(view: View, @StringRes resId: Int, duration: Int): DeweySnackbar

Make a Snackbar to display a message.

Snackbar will try and find a parent view to hold Snackbar's view from the value given to view. Snackbar will walk up the view tree trying to find a suitable parent, which is defined as a CoordinatorLayout or the window decor's content view, whichever comes first.

Having a CoordinatorLayout in your view hierarchy allows Snackbar to enable certain features, such as swipe-to-dismiss and automatically moving of widgets.

Parameters

view

The view to find a parent from.

resId

The resource id of the string resource to use. Can be formatted text.

duration

How long to display the message. Can be LENGTH_SHORT, LENGTH_LONG, LENGTH_INDEFINITE, or a custom duration in milliseconds.