Constructor and Description |
---|
SnackbarAdapter() |
Modifier and Type | Method and Description |
---|---|
static Snackbar |
make(View view,
int resId,
int duration)
Make a Snackbar to display a message.
|
public static Snackbar make(@NonNull View view, @StringRes int resId, int duration)
This snackbar will be full width of the parent. 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 like FloatingActionButton.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. Either or Snackbar#LENGTH_LONG or Snackbar#LENGTH_INDEFINITE
Snackbar
or null if error occured