From Documentation: parameter duration - either be one of the predefined lengths: LENGTH_SHORT, LENGTH_LONG, or a custom duration in milliseconds. But I can
Hello there give this external library a try https://github.com/nispok/snackbar. It is deprecated but it will easily solve your problem. It is moreover easy to implement. Before Support library i was using this library only for snackbars. Due to the duration problem of support library, i am happy to use this library only.