android how to know when snackbar is done

Solutions on MaxInterview for android how to know when snackbar is done by the best coders in the world

showing results for - "android how to know when snackbar is done"
Camille
03 Jan 2019
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});