-
-
Save jezinka/d3174d6366bd57e2bcda8174098ae4aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void showShoppingListDialog() { | |
MealIngredientContract mealIngredientContract = new MealIngredientContract(); | |
Dinner[] dinners = dinnerContract.getDinners(dbHelper); | |
List<Meal> meals = new ArrayList<>(); | |
for (Dinner dinner : dinners) { | |
Meal meal = dinner.getMeal(); | |
meals.add(meal); | |
} | |
AlertDialog d = new AlertDialog.Builder(this) | |
.setTitle(R.string.shopping_list) | |
.setPositiveButton(android.R.string.ok, null) | |
.setMessage(mealIngredientContract.getShoppingList(meals, dbHelper)) | |
.create(); | |
d.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment