Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public static DinnerDialogFragment newInstance(long date, Dinner dinner) {
DinnerDialogFragment f = new DinnerDialogFragment();
Bundle args = new Bundle();
args.putLong("date", date);
if (dinner != null) {
args.putLong("dinnerId", dinner.getId());
args.putLong("mealId", dinner.getMeal().getId());
args.putString("mealName", dinner.getMeal().getName());
}
f.setArguments(args);
return f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment