Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onLoadFinished(@NonNull Loader<Cursor> loader, Cursor data) {
- if (data != null) {
- if (data.getCount() > 0) {
- data.moveToFirst();
- do {
- mSupportedRecipes.add(
- data.getString(
- data.getColumnIndex(
- RecipeContract.RecipeIngredient.COLUMN_RECIPE_NAME)));
- } while (data.moveToNext());
- }
- // Clean-up the resource
- data.close();
- // Once closed the data can be fetched
- NetworkUtils.getRecipesFromNetwork(this);
- }
- }
Add Comment
Please, Sign In to add comment