From Documentation: parameter duration - either be one of the predefined lengths: LENGTH_SHORT, LENGTH_LONG, or a custom duration in milliseconds. But I can't set custom duration.
For example
Snackbar
.make(parentLayout, "Feed cat?", 8000) // try here
.setAction("Yes", snackOnClickListener)
.setActionTextColor(Color.MAGENTA)
.setDuration(8000) // try here
.show();
but instead of 8 seconds Snackbar gone quickly.