From 8e913189724b5eb54698e2173e4529634816d011 Mon Sep 17 00:00:00 2001 From: Jonathan Almeida Date: Wed, 21 Oct 2015 22:24:55 -0400 Subject: [PATCH] Added snackbar listener --- .../com/support/android/designlibdemo/MainActivity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/support/android/designlibdemo/MainActivity.java b/app/src/main/java/com/support/android/designlibdemo/MainActivity.java index 7f0f482..a2bdabd 100644 --- a/app/src/main/java/com/support/android/designlibdemo/MainActivity.java +++ b/app/src/main/java/com/support/android/designlibdemo/MainActivity.java @@ -76,7 +76,12 @@ protected void onCreate(Bundle savedInstanceState) { @Override public void onClick(View view) { Snackbar.make(view, "Here's a Snackbar", Snackbar.LENGTH_LONG) - .setAction("Action", null).show(); + .setAction("Action", new View.OnClickListener() { + @Override + public void onClick(View view) { + // Do nothing + } + }).show(); } });