Answers for "android how to show a snackbar"

6

android create snackbar

Snackbar.make(fragmentView, text, Snackbar.LENGTH_LONG).setAction("Action", null /* replace with your action or leave null to just display text*/).show();
Posted by: Guest on March-16-2020
0

android how to know when snackbar is done

snackbar.addCallback(new Snackbar.Callback() {

    @Override
    public void onDismissed(Snackbar snackbar, int event) {
        if (event == Snackbar.Callback.DISMISS_EVENT_TIMEOUT) {
            // Snackbar closed on its own
        }
    }

    @Override
    public void onShown(Snackbar snackbar) {
        ...
    }
});
Posted by: Guest on April-19-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language