1snackbar.addCallback(new Snackbar.Callback() {
2
3 @Override
4 public void onDismissed(Snackbar snackbar, int event) {
5 if (event == Snackbar.Callback.DISMISS_EVENT_TIMEOUT) {
6 // Snackbar closed on its own
7 }
8 }
9
10 @Override
11 public void onShown(Snackbar snackbar) {
12 ...
13 }
14});