Answers for "how to show snackbar in android"

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
1

snackbar android

Snackbar snackbar =  Snackbar.make(view, text, Snackbar.LENGTH_LONG);
                    snackbar.show();
Posted by: Guest on March-11-2021
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