cooperka / react-native-snackbar

:candy: Material Design "Snackbar" component for Android and iOS.
Other
815 stars 150 forks source link

Question : Is there any way to know whether the snackbar is opened #180

Open dngconsulting opened 3 years ago

dngconsulting commented 3 years ago

I have an absolute positioned Fab button that should be hidden when the snackbar is opened, is there any way to know whether the snackbar is visible or not ?

Thanks

cooperka commented 3 years ago

Hi @dngconsulting, as far as I know, Android doesn't provide callbacks for this and the timing can vary depending on platform. I'd welcome a PR if you know of a good solution.

iamrohitagg commented 2 years ago

I want to know some similar thing. How can I know if SnackBar is closed? I tried to add the function in onPress in action but what if the SnackBar is dismissed after the duration of LENGTH_LONG I have passed to duration.