Skip to content

Instantly share code, notes, and snippets.

@jezinka
Last active Apr 9, 2017
Embed
What would you like to do?
button
builder.setPositiveButton(meal == null ? R.string.add : R.string.edit, new DialogInterface.OnClickListener() {
@Override
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);
}
adapter.updateResults(mealContract.getAllMealsArray(dbHelper));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment