Created
July 26, 2017 19:21
-
-
Save rafaelje/2632ef9ca2e103498cbd06ad777fd033 to your computer and use it in GitHub Desktop.
Snack on 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
private void snack(View view, Context context, String message, String action) { | |
Snackbar.make(view, message, Snackbar.LENGTH_LONG) | |
.setActionTextColor(context.getResources().getColor(R.color.snackbar_action)) | |
.show(); | |
} | |
private void snack(View view, Context context, String message, String action, View.OnClickListener callback) { | |
Snackbar.make(view, message, Snackbar.LENGTH_LONG) | |
.setActionTextColor(context.getResources().getColor(R.color.snackbar_action)) | |
.setAction(action, callback) | |
.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment