OZ10 / Stropping

0 stars 0 forks source link

Add Ingredient to new Recipe #12

Closed OZ10 closed 8 years ago

OZ10 commented 8 years ago

Currently the app crashes when adding an ingredient to a new recipe. Cause: the _ingredientArrayAdapter is set to null because, being a new recipe, there is no ingredients list and therefore the adapter fails to initialise (returns null).

Fix: in onActivityResult, check if the _ingredientArrayAdapter is null and then set it. Need a decent way to do this (maybe a property?).

OZ10 commented 8 years ago

_ingredientArrayAdapter was set to null because it was only being initialised if an intent (i.e. a recipe was clicked) was found. _ingredientArrayAdapter now set to new before checking for an intent.