Skip to content

Instantly share code, notes, and snippets.

Last active Apr 9, 2017
What would you like to do?
builder.setPositiveButton(meal == null ? R.string.add : R.string.edit, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
mealName = input.getText().toString();
if (meal != null) {
mealContract.updateMeal(builder.getContext(), mealName, meal);
} else {
mealContract.insertMeal(builder.getContext(), mealName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment