Last active
May 14, 2017 08:19
-
-
Save tonY1883/904b5f328fecc7002095b2b18c324e37 to your computer and use it in GitHub Desktop.
code for displaying dismissable snackbar in android
This file contains 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
public static void showIndefiniteSnackBar(View view, String message){ | |
final Snackbar snack = Snackbar.make(view, message, Snackbar.LENGTH_INDEFINITE); | |
snack.setAction(android.R.string.ok, new View.OnClickListener() { | |
@Override | |
public void onClick(View view) { | |
snack.dismiss(); | |
} | |
}); | |
snack.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment