Last active
February 15, 2019 01:52
-
-
Save dynoChris/99385ed048bec2c723b207f60575c2b5 to your computer and use it in GitHub Desktop.
How to show SnackBar in Android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Snackbar.make(parentLayout, "Some Message", Snackbar.LENGTH_LONG) //you can just to pass built-in layout android.R.id.content | |
.setAction("Action", new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
//handle click here | |
} | |
}) | |
.show(); | |
//P.S. Usage built-in layout android.R.id.content: | |
//getActivity().findViewById(android.R.id.content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment