Lines Matching refs:recipe
30 public class Recipe {
59 public Recipe() {
63 public static Recipe fromJson(Context context, JSONObject json) {
64 Recipe recipe = new Recipe();
66 recipe.titleText = json.getString(Constants.RECIPE_FIELD_TITLE);
67 recipe.summaryText = json.getString(Constants.RECIPE_FIELD_SUMMARY);
69 recipe.recipeImage = json.getString(Constants.RECIPE_FIELD_IMAGE);
72 recipe.ingredientsText = "";
74 recipe.ingredientsText += " - "
86 recipe.recipeSteps.add(recipeStep);
89 Log.e(TAG, "Error loading recipe: " + e);
92 return recipe;
111 public static Recipe fromBundle(Bundle bundle) {
112 Recipe recipe = new Recipe();
113 recipe.titleText = bundle.getString(Constants.RECIPE_FIELD_TITLE);
114 recipe.summaryText = bundle.getString(Constants.RECIPE_FIELD_SUMMARY);
115 recipe.recipeImage = bundle.getString(Constants.RECIPE_FIELD_IMAGE);
116 recipe.ingredientsText = bundle.getString(Constants.RECIPE_FIELD_INGREDIENTS);
121 recipe.recipeSteps.add(RecipeStep.fromBundle((Bundle) stepBundle));
124 return recipe;