From Documentation: parameter duration - either be one of the predefined lengths: LENGTH_SHORT, LENGTH_LONG, or a custom duration in milliseconds. But I can
This code working perfectly for me try this
Snackbar.make(view, "Hello SnackBar", Snackbar.LENGTH_LONG)
.setAction("Its Roy", new View.OnClickListener() {
@Override
public void onClick(View v) {
}
})
.setDuration(10000)
.setActionTextColor(getResources().getColor(R.color.colorAccent))
.show();