Skip to content

Instantly share code, notes, and snippets.

Created May 25, 2017
What would you like to do?
private void showAddRecipeDialog(final Meal meal) {
View view = getLayoutInflater().inflate(R.layout.multiline_dialog, null);
final EditText recipeText = (EditText) view.findViewById(;
new AlertDialog.Builder(this)
.setPositiveButton(R.string.add, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
mealContract.addRecipe(dbHelper, recipeText.getText().toString(), meal.getId());
.setNegativeButton(R.string.cancel, null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment