MrEngineer13 / SnackBar

toast-like alert pattern for Android inspired by the Google Material Design Spec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to show the toast with duration infinity

kalyansriram opened this issue · comments

Hi,

This library looks cool. And i want to use this snackbar as toast in my app and i need to show a toast for retry action when no network is found and it shouldn't auto hide. It should be shown to the user till the user clicks retry button. Is it possible to do this with this library?

Thanks.

Yes, to show a SnackBar with an infinite duration just use SnackBar.PERMANENT_SNACK as the duration parameter like so:

mSnackBar.show("This is a permanent snack", SnackBar.PERMANENT_SNACK);

Hey thats Great! Thank you! :)