Skip to content

Commit

Permalink
Null checks before snackbars
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsPriyesh committed Oct 30, 2015
1 parent 8475448 commit f8d6bab
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,12 @@ public static void animSlideUp(View view, Context context) {
}

public static void snackbar(int messageResId, View parent) {
if (parent == null) return;
Snackbar.make(parent, messageResId, Snackbar.LENGTH_SHORT).show();
}

public static void snackbar(String message, View parent) {
if (parent == null) return;
Snackbar.make(parent, message, Snackbar.LENGTH_SHORT).show();
}

Expand Down

0 comments on commit f8d6bab

Please sign in to comment.