public RecipeBean getRecipeBean(String dish_id) { RecipeDBAdapter recipeDBAdapter = new RecipeDBAdapter(context); recipeDBAdapter.openDB(); RecipeBean dish = recipeDBAdapter.queryByFoodId(dish_id).get(0); recipeDBAdapter.closeDB(); return dish; }
// ================================== private void setRecipeList(String food_id) { RecipeDBAdapter recipeDBAdapter = new RecipeDBAdapter(context); recipeDBAdapter.openDB(); recipeList = recipeDBAdapter.queryByFoodId(food_id); recipeDBAdapter.closeDB(); }