0

I have a sticky Snackbar (Snackbar.LENGTH_INDEFINITE). In some cases, there is another temporary Snackbar (either long or short) that should appear as well. The new temporary Snackbar automatically dismisses the sticky one. I would like to keep the sticky one behind the temporary one, so that when the temporary Snackbar disappears, the sticky one is still shown.

Any ideas on how to do that?

ʍѳђઽ૯ท
  • 16,646
  • 7
  • 53
  • 108
Tiferet Cohen
  • 283
  • 2
  • 7
  • You could add a callback to the temporary ones so that they show the indefinite again when they dismiss. – Eric Martori Oct 15 '18 at 20:28
  • If you check out `Snackbar` source code, you will find it uses an internal singleton object `SnackbarManager` that provides only basic behavior of prolonging current `Snackbar` or replacing it with new one. You'd need to create a custom layout mimicking `Snackbar` for permanent one, or use dismiss callbacks of temporary one. – Pawel Oct 15 '18 at 20:41

0 Answers0